Use portid to physical address mapping to get correct port address.
ag/5662604
Note that framework caculated the port address from port index before.
But it's not correct any more after we changed port index to portid.
Test: manual
Bug: 120248694
Change-Id: I4074a924d548695cadb29956e2c3e416a27d86ec
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java
index 7653671..9a9821b 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java
@@ -1054,8 +1054,7 @@
return;
}
- int routingInformationPath =
- getActivePathOnSwitchFromActivePortId(getRoutingPort());
+ int routingInformationPath = mService.portIdToPath(getRoutingPort());
// If current device is already the leaf of the whole HDMI system, will do nothing.
if (routingInformationPath == mService.getPhysicalAddress()) {
HdmiLogger.debug("Current device can't assign valid physical address"