Loading services/core/java/com/android/server/hdmi/DeviceSelectAction.java +14 −10 Original line number Diff line number Diff line Loading @@ -100,19 +100,23 @@ final class DeviceSelectAction extends HdmiCecFeatureAction { // Wake-up on <Set Stream Path> was not mandatory before CEC 2.0. // The message is re-sent at the end of the action for devices that don't support 2.0. sendSetStreamPath(); if (!mIsCec20) { queryDevicePowerStatus(); } else { int targetPowerStatus = HdmiControlManager.POWER_STATUS_UNKNOWN; HdmiDeviceInfo targetDevice = localDevice().mService.getHdmiCecNetwork().getCecDeviceInfo( getTargetAddress()); HdmiDeviceInfo targetDevice = localDevice().mService.getHdmiCecNetwork() .getCecDeviceInfo(getTargetAddress()); if (targetDevice != null) { targetPowerStatus = targetDevice.getDevicePowerStatus(); } if (!mIsCec20 || targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { if (targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { queryDevicePowerStatus(); } else if (targetPowerStatus == HdmiControlManager.POWER_STATUS_ON) { finishWithCallback(HdmiControlManager.RESULT_SUCCESS); return true; } } mState = STATE_WAIT_FOR_REPORT_POWER_STATUS; addTimer(mState, HdmiConfig.TIMEOUT_MS); return true; Loading services/core/java/com/android/server/hdmi/OneTouchPlayAction.java +16 −11 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ final class OneTouchPlayAction extends HdmiCecFeatureAction { mSource = source(); sendCommand(HdmiCecMessageBuilder.buildTextViewOn(getSourceAddress(), mTargetAddress)); boolean targetOnBefore = getTargetDevicePowerStatus(mSource, mTargetAddress, boolean is20TargetOnBefore = mIsCec20 && getTargetDevicePowerStatus(mSource, mTargetAddress, HdmiControlManager.POWER_STATUS_UNKNOWN) == HdmiControlManager.POWER_STATUS_ON; broadcastActiveSource(); // If the device is not an audio system itself, request the connected audio system to Loading @@ -98,12 +98,16 @@ final class OneTouchPlayAction extends HdmiCecFeatureAction { sendCommand(HdmiCecMessageBuilder.buildSystemAudioModeRequest(getSourceAddress(), Constants.ADDR_AUDIO_SYSTEM, getSourcePath(), true)); } if (!mIsCec20) { queryDevicePowerStatus(); } else { int targetPowerStatus = getTargetDevicePowerStatus(mSource, mTargetAddress, HdmiControlManager.POWER_STATUS_UNKNOWN); if (!mIsCec20 || targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { if (targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { queryDevicePowerStatus(); } else if (targetPowerStatus == HdmiControlManager.POWER_STATUS_ON) { if (!targetOnBefore) { if (!is20TargetOnBefore) { // Suppress 2nd <Active Source> message if the target device was already on when // the 1st one was sent. broadcastActiveSource(); Loading @@ -111,6 +115,7 @@ final class OneTouchPlayAction extends HdmiCecFeatureAction { finishWithCallback(HdmiControlManager.RESULT_SUCCESS); return true; } } mState = STATE_WAITING_FOR_REPORT_POWER_STATUS; addTimer(mState, HdmiConfig.TIMEOUT_MS); return true; Loading Loading
services/core/java/com/android/server/hdmi/DeviceSelectAction.java +14 −10 Original line number Diff line number Diff line Loading @@ -100,19 +100,23 @@ final class DeviceSelectAction extends HdmiCecFeatureAction { // Wake-up on <Set Stream Path> was not mandatory before CEC 2.0. // The message is re-sent at the end of the action for devices that don't support 2.0. sendSetStreamPath(); if (!mIsCec20) { queryDevicePowerStatus(); } else { int targetPowerStatus = HdmiControlManager.POWER_STATUS_UNKNOWN; HdmiDeviceInfo targetDevice = localDevice().mService.getHdmiCecNetwork().getCecDeviceInfo( getTargetAddress()); HdmiDeviceInfo targetDevice = localDevice().mService.getHdmiCecNetwork() .getCecDeviceInfo(getTargetAddress()); if (targetDevice != null) { targetPowerStatus = targetDevice.getDevicePowerStatus(); } if (!mIsCec20 || targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { if (targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { queryDevicePowerStatus(); } else if (targetPowerStatus == HdmiControlManager.POWER_STATUS_ON) { finishWithCallback(HdmiControlManager.RESULT_SUCCESS); return true; } } mState = STATE_WAIT_FOR_REPORT_POWER_STATUS; addTimer(mState, HdmiConfig.TIMEOUT_MS); return true; Loading
services/core/java/com/android/server/hdmi/OneTouchPlayAction.java +16 −11 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ final class OneTouchPlayAction extends HdmiCecFeatureAction { mSource = source(); sendCommand(HdmiCecMessageBuilder.buildTextViewOn(getSourceAddress(), mTargetAddress)); boolean targetOnBefore = getTargetDevicePowerStatus(mSource, mTargetAddress, boolean is20TargetOnBefore = mIsCec20 && getTargetDevicePowerStatus(mSource, mTargetAddress, HdmiControlManager.POWER_STATUS_UNKNOWN) == HdmiControlManager.POWER_STATUS_ON; broadcastActiveSource(); // If the device is not an audio system itself, request the connected audio system to Loading @@ -98,12 +98,16 @@ final class OneTouchPlayAction extends HdmiCecFeatureAction { sendCommand(HdmiCecMessageBuilder.buildSystemAudioModeRequest(getSourceAddress(), Constants.ADDR_AUDIO_SYSTEM, getSourcePath(), true)); } if (!mIsCec20) { queryDevicePowerStatus(); } else { int targetPowerStatus = getTargetDevicePowerStatus(mSource, mTargetAddress, HdmiControlManager.POWER_STATUS_UNKNOWN); if (!mIsCec20 || targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { if (targetPowerStatus == HdmiControlManager.POWER_STATUS_UNKNOWN) { queryDevicePowerStatus(); } else if (targetPowerStatus == HdmiControlManager.POWER_STATUS_ON) { if (!targetOnBefore) { if (!is20TargetOnBefore) { // Suppress 2nd <Active Source> message if the target device was already on when // the 1st one was sent. broadcastActiveSource(); Loading @@ -111,6 +115,7 @@ final class OneTouchPlayAction extends HdmiCecFeatureAction { finishWithCallback(HdmiControlManager.RESULT_SUCCESS); return true; } } mState = STATE_WAITING_FOR_REPORT_POWER_STATUS; addTimer(mState, HdmiConfig.TIMEOUT_MS); return true; Loading