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

Commit 78cbb7a5 authored by Dominic Lemire's avatar Dominic Lemire
Browse files

CEC: invalidate physical address on getPhysicalAddress failure

Bug: 368084138
Test: manual (connect to a different HDMI port while in sleep)
Change-Id: Ie017bedfba053ed2ca263d4d13eec222be311119
parent ba62d4ba
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1207,9 +1207,11 @@ final class HdmiCecController {

        @Override
        public void onValues(int result, short addr) {
            if (result == Result.SUCCESS) {
            synchronized (mLock) {
                if (result == Result.SUCCESS) {
                    mPhysicalAddress = Short.toUnsignedInt(addr);
                } else {
                    mPhysicalAddress = INVALID_PHYSICAL_ADDRESS;
                }
            }
        }
@@ -1605,9 +1607,11 @@ final class HdmiCecController {

        @Override
        public void onValues(int result, short addr) {
            if (result == Result.SUCCESS) {
            synchronized (mLock) {
                if (result == Result.SUCCESS) {
                    mPhysicalAddress = Short.toUnsignedInt(addr);
                } else {
                    mPhysicalAddress = INVALID_PHYSICAL_ADDRESS;
                }
            }
        }