Search in sources :

Example 1 with PendingActionClearedCallback

use of com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback in project platform_frameworks_base by android.

the class HdmiControlService method disableHdmiControlService.

@ServiceThreadOnly
private void disableHdmiControlService() {
    disableDevices(new PendingActionClearedCallback() {

        @Override
        public void onCleared(HdmiCecLocalDevice device) {
            assertRunOnServiceThread();
            mCecController.flush(new Runnable() {

                @Override
                public void run() {
                    mCecController.setOption(OPTION_CEC_ENABLE, DISABLED);
                    mMhlController.setOption(OPTION_MHL_ENABLE, DISABLED);
                    clearLocalDevices();
                }
            });
        }
    });
}
Also used : PendingActionClearedCallback(com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback) ServiceThreadOnly(com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly)

Example 2 with PendingActionClearedCallback

use of com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback in project android_frameworks_base by DirtyUnicorns.

the class HdmiControlService method onStandby.

@ServiceThreadOnly
private void onStandby(final int standbyAction) {
    assertRunOnServiceThread();
    mPowerStatus = HdmiControlManager.POWER_STATUS_TRANSIENT_TO_STANDBY;
    invokeVendorCommandListenersOnControlStateChanged(false, HdmiControlManager.CONTROL_STATE_CHANGED_REASON_STANDBY);
    if (!canGoToStandby()) {
        mPowerStatus = HdmiControlManager.POWER_STATUS_STANDBY;
        return;
    }
    final List<HdmiCecLocalDevice> devices = getAllLocalDevices();
    disableDevices(new PendingActionClearedCallback() {

        @Override
        public void onCleared(HdmiCecLocalDevice device) {
            Slog.v(TAG, "On standby-action cleared:" + device.mDeviceType);
            devices.remove(device);
            if (devices.isEmpty()) {
                onStandbyCompleted(standbyAction);
            // We will not clear local devices here, since some OEM/SOC will keep passing
            // the received packets until the application processor enters to the sleep
            // actually.
            }
        }
    });
}
Also used : PendingActionClearedCallback(com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback) ServiceThreadOnly(com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly)

Example 3 with PendingActionClearedCallback

use of com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback in project android_frameworks_base by DirtyUnicorns.

the class HdmiControlService method disableHdmiControlService.

@ServiceThreadOnly
private void disableHdmiControlService() {
    disableDevices(new PendingActionClearedCallback() {

        @Override
        public void onCleared(HdmiCecLocalDevice device) {
            assertRunOnServiceThread();
            mCecController.flush(new Runnable() {

                @Override
                public void run() {
                    mCecController.setOption(OPTION_CEC_ENABLE, DISABLED);
                    mMhlController.setOption(OPTION_MHL_ENABLE, DISABLED);
                    clearLocalDevices();
                }
            });
        }
    });
}
Also used : PendingActionClearedCallback(com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback) ServiceThreadOnly(com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly)

Example 4 with PendingActionClearedCallback

use of com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback in project android_frameworks_base by crdroidandroid.

the class HdmiControlService method disableHdmiControlService.

@ServiceThreadOnly
private void disableHdmiControlService() {
    disableDevices(new PendingActionClearedCallback() {

        @Override
        public void onCleared(HdmiCecLocalDevice device) {
            assertRunOnServiceThread();
            mCecController.flush(new Runnable() {

                @Override
                public void run() {
                    mCecController.setOption(OPTION_CEC_ENABLE, DISABLED);
                    mMhlController.setOption(OPTION_MHL_ENABLE, DISABLED);
                    clearLocalDevices();
                }
            });
        }
    });
}
Also used : PendingActionClearedCallback(com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback) ServiceThreadOnly(com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly)

Example 5 with PendingActionClearedCallback

use of com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback in project platform_frameworks_base by android.

the class HdmiControlService method onStandby.

@ServiceThreadOnly
private void onStandby(final int standbyAction) {
    assertRunOnServiceThread();
    if (!canGoToStandby())
        return;
    mPowerStatus = HdmiControlManager.POWER_STATUS_TRANSIENT_TO_STANDBY;
    invokeVendorCommandListenersOnControlStateChanged(false, HdmiControlManager.CONTROL_STATE_CHANGED_REASON_STANDBY);
    final List<HdmiCecLocalDevice> devices = getAllLocalDevices();
    disableDevices(new PendingActionClearedCallback() {

        @Override
        public void onCleared(HdmiCecLocalDevice device) {
            Slog.v(TAG, "On standby-action cleared:" + device.mDeviceType);
            devices.remove(device);
            if (devices.isEmpty()) {
                onStandbyCompleted(standbyAction);
            // We will not clear local devices here, since some OEM/SOC will keep passing
            // the received packets until the application processor enters to the sleep
            // actually.
            }
        }
    });
}
Also used : PendingActionClearedCallback(com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback) ServiceThreadOnly(com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly)

Aggregations

ServiceThreadOnly (com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly)10 PendingActionClearedCallback (com.android.server.hdmi.HdmiCecLocalDevice.PendingActionClearedCallback)10