diff options
author | Jinsuk Kim <jinsukkim@google.com> | 2014-08-12 18:10:21 +0900 |
---|---|---|
committer | Jinsuk Kim <jinsukkim@google.com> | 2014-08-13 00:53:28 +0000 |
commit | 8e083ec0444e52cb203228bcf1c1cd34bcc4e70d (patch) | |
tree | 6f1d80189cbbc3663ba1356d5fbbd05820468922 | |
parent | f2546bf4235d0c875e9394986535febf068b6101 (diff) | |
download | frameworks_base-8e083ec0444e52cb203228bcf1c1cd34bcc4e70d.zip frameworks_base-8e083ec0444e52cb203228bcf1c1cd34bcc4e70d.tar.gz frameworks_base-8e083ec0444e52cb203228bcf1c1cd34bcc4e70d.tar.bz2 |
CEC: Remove timeout from deviceSelect processing
20-second timeout set for incoming <active source> command after
<set stream path> is moved out of HdmiControlService, to
HDMI input service.
Bug: 16967429
Change-Id: I5b50b0187e562b51e227a29e54824740ca37906e
-rw-r--r-- | services/core/java/com/android/server/hdmi/DeviceSelectAction.java | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/services/core/java/com/android/server/hdmi/DeviceSelectAction.java b/services/core/java/com/android/server/hdmi/DeviceSelectAction.java index ed37ead..d155e84 100644 --- a/services/core/java/com/android/server/hdmi/DeviceSelectAction.java +++ b/services/core/java/com/android/server/hdmi/DeviceSelectAction.java @@ -23,7 +23,6 @@ import android.hardware.hdmi.IHdmiControlCallback; import android.os.RemoteException; import android.util.Slog; -import com.android.server.hdmi.HdmiCecLocalDevice.ActiveSource; import com.android.server.hdmi.HdmiControlService.SendMessageCallback; /** @@ -42,9 +41,6 @@ final class DeviceSelectAction extends HdmiCecFeatureAction { // Time in milliseconds we wait for the device power status to turn to 'On'. private static final int TIMEOUT_POWER_ON_MS = 5 * 1000; - // Time in milliseconds we wait for <Active Source>. - private static final int TIMEOUT_ACTIVE_SOURCE_MS = 20 * 1000; - // The number of times we try to wake up the target device before we give up // and just send <Set Stream Path>. private static final int LOOP_COUNTER_MAX = 20; @@ -62,11 +58,6 @@ final class DeviceSelectAction extends HdmiCecFeatureAction { // maximum 100 seconds (20 * 5) before we give up and just send <Set Stream Path>. private static final int STATE_WAIT_FOR_DEVICE_POWER_ON = 3; - // State in which we wait for the <Active Source> in response to the command - // <Set Stream Path> we have sent. We wait as much as TIMEOUT_ACTIVE_SOURCE_MS - // before we give up and mark the action as failure. - private static final int STATE_WAIT_FOR_ACTIVE_SOURCE = 4; - private final HdmiDeviceInfo mTarget; private final IHdmiControlCallback mCallback; private final HdmiCecMessage mGivePowerStatus; @@ -129,16 +120,6 @@ final class DeviceSelectAction extends HdmiCecFeatureAction { return handleReportPowerStatus(params[0]); } return false; - case STATE_WAIT_FOR_ACTIVE_SOURCE: - if (opcode == Constants.MESSAGE_ACTIVE_SOURCE) { - int physicalAddress = HdmiUtils.twoBytesToInt(params); - ActiveSourceHandler - .create((HdmiCecLocalDeviceTv) localDevice(), mCallback) - .process(ActiveSource.of(cmd.getSource(), physicalAddress)); - finish(); - return true; - } - return false; default: break; } @@ -189,8 +170,8 @@ final class DeviceSelectAction extends HdmiCecFeatureAction { private void sendSetStreamPath() { sendCommand(HdmiCecMessageBuilder.buildSetStreamPath( getSourceAddress(), mTarget.getPhysicalAddress())); - mState = STATE_WAIT_FOR_ACTIVE_SOURCE; - addTimer(mState, TIMEOUT_ACTIVE_SOURCE_MS); + invokeCallback(HdmiControlManager.RESULT_SUCCESS); + finish(); } @Override @@ -213,10 +194,6 @@ final class DeviceSelectAction extends HdmiCecFeatureAction { mPowerStatusCounter++; queryDevicePowerStatus(); break; - case STATE_WAIT_FOR_ACTIVE_SOURCE: - invokeCallback(HdmiControlManager.RESULT_TIMEOUT); - finish(); - break; } } |