Invoke device event listeners when clearing CEC devices

This updates the client of HdmiControlService so that CEC devices
will disappear when thd CEC control is disabled.

Bug: 16467361

Change-Id: If6fad3be0aa3335aa7f955c0586040250e9c0e06
This commit is contained in:
Jinsuk Kim
2014-07-22 10:40:35 +09:00
parent b35fba0265
commit 49b47bbef8

View File

@@ -556,6 +556,9 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
@ServiceThreadOnly
private void clearDeviceInfoList() {
assertRunOnServiceThread();
for (HdmiCecDeviceInfo info : mSafeExternalInputs) {
mService.invokeDeviceEventListeners(info, false);
}
mDeviceInfos.clear();
updateSafeDeviceInfoList();
}
@@ -1129,6 +1132,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
disableSystemAudioIfExist();
disableArcIfExist();
clearDeviceInfoList();
checkIfPendingActionsCleared();
}