Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment