Fixes a bug that was updating ARC status on hotplug event
regardless of the port for which the event occurred.
Bug:
20520664
Change-Id: I17c4f391af4dd221215412ed9e3ff3d730bbf152
@ServiceThreadOnly
private void updateArcFeatureStatus(int portId, boolean isConnected) {
assertRunOnServiceThread();
+ HdmiDeviceInfo avr = getAvrDeviceInfo();
+ if (avr == null) {
+ return;
+ }
// HEAC 2.4, HEACT 5-15
// Should not activate ARC if +5V status is false.
HdmiPortInfo portInfo = mService.getPortInfo(portId);
- if (portInfo.isArcSupported()) {
+ if (avr.getPortId() == portId && portInfo.isArcSupported()) {
changeArcFeatureEnabled(portId, isConnected);
}
}