diff options
author | Jinsuk Kim <jinsukkim@google.com> | 2015-05-11 07:49:51 +0900 |
---|---|---|
committer | Jinsuk Kim <jinsukkim@google.com> | 2015-05-11 08:10:35 +0900 |
commit | 37f5bc281c40965f8604400d700e68c0d17e77b0 (patch) | |
tree | cc5c92fecd57af83eb799616c19852e7c596d0df /services/core/java/com/android/server/hdmi | |
parent | edcaf7c9338d4b3b78766ccec9c1e2c4dcd75cf2 (diff) | |
download | frameworks_base-37f5bc281c40965f8604400d700e68c0d17e77b0.zip frameworks_base-37f5bc281c40965f8604400d700e68c0d17e77b0.tar.gz frameworks_base-37f5bc281c40965f8604400d700e68c0d17e77b0.tar.bz2 |
CEC: Update ARC feature flag on hotplug
ARC feature flag should have been updated whenever hotplug[on]
was detected, so that the ARC can be established upon device
discovery. This CL rectifies the bug.
Bug: 20817208
Change-Id: I5053ad3f576d0e405b6d8fc0c4e6584e66ed0a86
Diffstat (limited to 'services/core/java/com/android/server/hdmi')
-rw-r--r-- | services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java index 5ac027d..e9fc648 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java @@ -905,14 +905,22 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { @ServiceThreadOnly private void updateArcFeatureStatus(int portId, boolean isConnected) { assertRunOnServiceThread(); + HdmiPortInfo portInfo = mService.getPortInfo(portId); + if (!portInfo.isArcSupported()) { + return; + } HdmiDeviceInfo avr = getAvrDeviceInfo(); if (avr == null) { + if (isConnected) { + // Update the status (since TV may not have seen AVR yet) so + // that ARC can be initiated after discovery. + mArcFeatureEnabled.put(portId, isConnected); + } return; } // HEAC 2.4, HEACT 5-15 // Should not activate ARC if +5V status is false. - HdmiPortInfo portInfo = mService.getPortInfo(portId); - if (avr.getPortId() == portId && portInfo.isArcSupported()) { + if (avr.getPortId() == portId) { changeArcFeatureEnabled(portId, isConnected); } } |