FileDocCategorySizeDatePackage
HdmiPlaybackClient.javaAPI DocAndroid 5.1 API4185Thu Mar 12 22:22:10 GMT 2015android.hardware.hdmi

HdmiPlaybackClient

public final class HdmiPlaybackClient extends HdmiClient
HdmiPlaybackClient represents HDMI-CEC logical device of type Playback in the Android system which acts as a playback device such as set-top box. It provides with methods that control, get information from TV/Display device connected through HDMI bus.
hide

Fields Summary
private static final String
TAG
Constructors Summary
HdmiPlaybackClient(IHdmiControlService service)


                       
       
                                                
           
    

                   
       
                                                                                                                              
           
    

    /* package */   
        super(service);
    
Methods Summary
private IHdmiControlCallbackgetCallbackWrapper(android.hardware.hdmi.HdmiPlaybackClient$OneTouchPlayCallback callback)

        return new IHdmiControlCallback.Stub() {
            @Override
            public void onComplete(int result) {
                callback.onComplete(result);
            }
        };
    
private IHdmiControlCallbackgetCallbackWrapper(android.hardware.hdmi.HdmiPlaybackClient$DisplayStatusCallback callback)

        return new IHdmiControlCallback.Stub() {
            @Override
            public void onComplete(int status) {
                callback.onComplete(status);
            }
        };
    
public intgetDeviceType()

        return HdmiDeviceInfo.DEVICE_PLAYBACK;
    
public voidoneTouchPlay(android.hardware.hdmi.HdmiPlaybackClient$OneTouchPlayCallback callback)
Performs the feature 'one touch play' from playback device to turn on display and switch the input.

param
callback {@link OneTouchPlayCallback} object to get informed of the result

        // TODO: Use PendingResult.
        try {
            mService.oneTouchPlay(getCallbackWrapper(callback));
        } catch (RemoteException e) {
            Log.e(TAG, "oneTouchPlay threw exception ", e);
        }
    
public voidqueryDisplayStatus(android.hardware.hdmi.HdmiPlaybackClient$DisplayStatusCallback callback)
Gets the status of display device connected through HDMI bus.

param
callback {@link DisplayStatusCallback} object to get informed of the result

        try {
            mService.queryDisplayStatus(getCallbackWrapper(callback));
        } catch (RemoteException e) {
            Log.e(TAG, "queryDisplayStatus threw exception ", e);
        }