Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba62d4ba authored by Dominic Lemire's avatar Dominic Lemire
Browse files

CEC: avoid sign-extending physical addresses

In case the HAL returns INVALID_PHYSICAL_ADDRESS with
SUCCESS (instead of FAILURE_INVALID_STATE),
mPhysicalAddress should be 0xFFFF, not -1.

Bug: 368084138
Test: manual

Change-Id: If29d58faccc99f56cc8142d093ba86cf134d0c25
parent e4df6da4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1209,7 +1209,7 @@ final class HdmiCecController {
        public void onValues(int result, short addr) {
            if (result == Result.SUCCESS) {
                synchronized (mLock) {
                    mPhysicalAddress = new Short(addr).intValue();
                    mPhysicalAddress = Short.toUnsignedInt(addr);
                }
            }
        }
@@ -1607,7 +1607,7 @@ final class HdmiCecController {
        public void onValues(int result, short addr) {
            if (result == Result.SUCCESS) {
                synchronized (mLock) {
                    mPhysicalAddress = new Short(addr).intValue();
                    mPhysicalAddress = Short.toUnsignedInt(addr);
                }
            }
        }