Merge "CEC: Update CEC device info properly" into lmp-mr1-dev
This commit is contained in:
@@ -1324,12 +1324,16 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
|||||||
@ServiceThreadOnly
|
@ServiceThreadOnly
|
||||||
final void addCecDevice(HdmiDeviceInfo info) {
|
final void addCecDevice(HdmiDeviceInfo info) {
|
||||||
assertRunOnServiceThread();
|
assertRunOnServiceThread();
|
||||||
addDeviceInfo(info);
|
HdmiDeviceInfo old = addDeviceInfo(info);
|
||||||
if (info.getLogicalAddress() == mAddress) {
|
if (info.getLogicalAddress() == mAddress) {
|
||||||
// The addition of TV device itself should not be notified.
|
// The addition of TV device itself should not be notified.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (old == null) {
|
||||||
invokeDeviceEventListener(info, HdmiControlManager.DEVICE_EVENT_ADD_DEVICE);
|
invokeDeviceEventListener(info, HdmiControlManager.DEVICE_EVENT_ADD_DEVICE);
|
||||||
|
} else if (!old.equals(info)) {
|
||||||
|
invokeDeviceEventListener(info, HdmiControlManager.DEVICE_EVENT_UPDATE_DEVICE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user