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

Commit c304c162 authored by Nathalie Le Clair's avatar Nathalie Le Clair Committed by Android (Google) Code Review
Browse files

Merge "Use up-to-date power status in DeviceSelectAction" into sc-dev

parents ce7bd347 fbc778ea
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -103,10 +103,11 @@ final class DeviceSelectAction extends HdmiCecFeatureAction {
        if (mIsCec20) {
            sendSetStreamPath();
        }
        if (!mIsCec20 || mTarget.getDevicePowerStatus()
                              == HdmiControlManager.POWER_STATUS_UNKNOWN) {
        int targetPowerStatus = localDevice().mService.getHdmiCecNetwork()
                .getCecDeviceInfo(getTargetAddress()).getDevicePowerStatus();
        if (!mIsCec20 || targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) {
            queryDevicePowerStatus();
        } else if (mTarget.getDevicePowerStatus() == HdmiControlManager.POWER_STATUS_ON) {
        } else if (targetPowerStatus == HdmiControlManager.POWER_STATUS_ON) {
            invokeCallbackAndFinish(HdmiControlManager.RESULT_SUCCESS);
            return true;
        }