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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user