Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d12655b8 authored by Donghyun Cho's avatar Donghyun Cho Committed by Android (Google) Code Review
Browse files

Merge "CEC: Revive a standby handler"

parents 6561845b afd26a25
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -250,7 +250,8 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    @ServiceThreadOnly
    @ServiceThreadOnly
    boolean dispatchMessage(HdmiCecMessage message) {
    boolean dispatchMessage(HdmiCecMessage message) {
        assertRunOnServiceThread();
        assertRunOnServiceThread();
        if (mService.isPowerStandby() && mStandbyHandler.handleCommand(message)) {
        if (mService.isPowerStandby() && !mService.isWakeUpMessageReceived()
                && mStandbyHandler.handleCommand(message)) {
            return true;
            return true;
        }
        }
        return super.onMessage(message);
        return super.onMessage(message);
+4 −1
Original line number Original line Diff line number Diff line
@@ -2017,6 +2017,10 @@ public final class HdmiControlService extends SystemService {
        // the intent, the sequence will continue at onStandby().
        // the intent, the sequence will continue at onStandby().
    }
    }


    boolean isWakeUpMessageReceived() {
        return mWakeUpMessageReceived;
    }

    @ServiceThreadOnly
    @ServiceThreadOnly
    private void onWakeUp() {
    private void onWakeUp() {
        assertRunOnServiceThread();
        assertRunOnServiceThread();
@@ -2119,7 +2123,6 @@ public final class HdmiControlService extends SystemService {
            device.onStandby(mStandbyMessageReceived, standbyAction);
            device.onStandby(mStandbyMessageReceived, standbyAction);
        }
        }
        mStandbyMessageReceived = false;
        mStandbyMessageReceived = false;
        mAddressAllocated = false;
        mCecController.setOption(OptionKey.SYSTEM_CEC_CONTROL, false);
        mCecController.setOption(OptionKey.SYSTEM_CEC_CONTROL, false);
        mMhlController.setOption(OPTION_MHL_SERVICE_CONTROL, DISABLED);
        mMhlController.setOption(OPTION_MHL_SERVICE_CONTROL, DISABLED);
    }
    }