Loading services/core/java/com/android/server/hdmi/HdmiCecNetwork.java +5 −1 Original line number Diff line number Diff line Loading @@ -655,9 +655,13 @@ public class HdmiCecNetwork { .setPortId(physicalAddressToPortId(physicalAddress)) .setDeviceType(type) .build(); if (deviceInfo.getPhysicalAddress() != physicalAddress) { addCecDevice(updatedDeviceInfo); } else { updateCecDevice(updatedDeviceInfo); } } } @ServiceThreadOnly private void handleReportPowerStatus(HdmiCecMessage message) { Loading services/tests/servicestests/src/com/android/server/hdmi/HdmiCecNetworkTest.java +5 −4 Original line number Diff line number Diff line Loading @@ -396,7 +396,7 @@ public class HdmiCecNetworkTest { } @Test public void cecDevices_tracking_updatesPhysicalAddress() { public void cecDevices_tracking_updatesPhysicalAddress_add() { int logicalAddress = Constants.ADDR_PLAYBACK_1; int initialPhysicalAddress = 0x1000; int updatedPhysicalAddress = 0x2000; Loading @@ -415,11 +415,12 @@ public class HdmiCecNetworkTest { assertThat(cecDeviceInfo.getPhysicalAddress()).isEqualTo(updatedPhysicalAddress); assertThat(cecDeviceInfo.getDeviceType()).isEqualTo(type); // ADD for physical address first detected // UPDATE for updating device with new physical address // Handle case where PA is changed: Update CEC device information by calling // addCecDevice(). assertThat(mDeviceEventListenerStatuses).containsExactly( HdmiControlManager.DEVICE_EVENT_ADD_DEVICE, HdmiControlManager.DEVICE_EVENT_UPDATE_DEVICE); HdmiControlManager.DEVICE_EVENT_REMOVE_DEVICE, HdmiControlManager.DEVICE_EVENT_ADD_DEVICE); } @Test Loading Loading
services/core/java/com/android/server/hdmi/HdmiCecNetwork.java +5 −1 Original line number Diff line number Diff line Loading @@ -655,9 +655,13 @@ public class HdmiCecNetwork { .setPortId(physicalAddressToPortId(physicalAddress)) .setDeviceType(type) .build(); if (deviceInfo.getPhysicalAddress() != physicalAddress) { addCecDevice(updatedDeviceInfo); } else { updateCecDevice(updatedDeviceInfo); } } } @ServiceThreadOnly private void handleReportPowerStatus(HdmiCecMessage message) { Loading
services/tests/servicestests/src/com/android/server/hdmi/HdmiCecNetworkTest.java +5 −4 Original line number Diff line number Diff line Loading @@ -396,7 +396,7 @@ public class HdmiCecNetworkTest { } @Test public void cecDevices_tracking_updatesPhysicalAddress() { public void cecDevices_tracking_updatesPhysicalAddress_add() { int logicalAddress = Constants.ADDR_PLAYBACK_1; int initialPhysicalAddress = 0x1000; int updatedPhysicalAddress = 0x2000; Loading @@ -415,11 +415,12 @@ public class HdmiCecNetworkTest { assertThat(cecDeviceInfo.getPhysicalAddress()).isEqualTo(updatedPhysicalAddress); assertThat(cecDeviceInfo.getDeviceType()).isEqualTo(type); // ADD for physical address first detected // UPDATE for updating device with new physical address // Handle case where PA is changed: Update CEC device information by calling // addCecDevice(). assertThat(mDeviceEventListenerStatuses).containsExactly( HdmiControlManager.DEVICE_EVENT_ADD_DEVICE, HdmiControlManager.DEVICE_EVENT_UPDATE_DEVICE); HdmiControlManager.DEVICE_EVENT_REMOVE_DEVICE, HdmiControlManager.DEVICE_EVENT_ADD_DEVICE); } @Test Loading