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

Commit 8869917e authored by Nathalie Le Clair's avatar Nathalie Le Clair Committed by Automerger Merge Worker
Browse files

Merge "Get HDMI CEC physical address with service thread, so TIF can get it...

Merge "Get HDMI CEC physical address with service thread, so TIF can get it for Player." am: 3f2521f1 am: 0fc13761 am: 5c123fb1 am: d8e44605 am: 4a83b7c2

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2219765



Change-Id: I69179f54f620bb1ac960fc82d33af032751aa98d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents db32dc00 4a83b7c2
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -266,6 +266,10 @@ public class HdmiControlService extends SystemService {
    // Make sure HdmiCecConfig is instantiated and the XMLs are read.
    private HdmiCecConfig mHdmiCecConfig;

    // Last return value of getPhysicalAddress(). Only updated on calls of getPhysicalAddress().
    // Does not represent the current physical address at all times. Not to be used as a cache.
    private int mPhysicalAddress = Constants.INVALID_PHYSICAL_ADDRESS;

    /**
     * Interface to report send result.
     */
@@ -2078,9 +2082,15 @@ public class HdmiControlService extends SystemService {
        @Override
        public int getPhysicalAddress() {
            initBinderCall();
            runOnServiceThread(new Runnable() {
                @Override
                public void run() {
                    synchronized (mLock) {
                return mHdmiCecNetwork.getPhysicalAddress();
                        mPhysicalAddress = mHdmiCecNetwork.getPhysicalAddress();
                    }
                }
            });
            return mPhysicalAddress;
        }

        @Override