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

Commit 98d760e1 authored by Jinsuk Kim's avatar Jinsuk Kim
Browse files

CEC: Let the caller check CEC device type

Device event listener mechanism invoke the callback on all kinds
of devices in order to deal with a caller who wants to get notified
for all types. TIF was changed to check the device type to make
sure it handles source type only.

Bug: 18832462
Change-Id: I5123fe79c09f623849b93b64d0c28e6a930dd437
parent ffe80ab7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1248,7 +1248,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    }

    private void invokeDeviceEventListener(HdmiDeviceInfo info, int status) {
        if (info.isSourceType() && !hideDevicesBehindLegacySwitch(info)) {
        if (!hideDevicesBehindLegacySwitch(info)) {
            mService.invokeDeviceEventListeners(info, status);
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -1108,6 +1108,7 @@ class TvInputHardwareManager implements TvInputHal.Callback {
    private final class HdmiDeviceEventListener extends IHdmiDeviceEventListener.Stub {
        @Override
        public void onStatusChanged(HdmiDeviceInfo deviceInfo, int status) {
            if (!deviceInfo.isSourceType()) return;
            synchronized (mLock) {
                int messageType = 0;
                Object obj = null;