diff options
author | Jungshik Jang <jayjang@google.com> | 2014-08-20 01:19:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-16 04:12:14 +0000 |
commit | 5ba6906768f2bdc22fea45f064dcb5ef96cd78e0 (patch) | |
tree | 3ccedca69189712c10b1d0cc706c7b3c1811789c /services/core/java/com/android/server/hdmi | |
parent | 2738e2d872a22fe95a99941139863ff642fbd8e7 (diff) | |
parent | 350e68d0b80c22e6ec37dd683134f46079619803 (diff) | |
download | frameworks_base-5ba6906768f2bdc22fea45f064dcb5ef96cd78e0.zip frameworks_base-5ba6906768f2bdc22fea45f064dcb5ef96cd78e0.tar.gz frameworks_base-5ba6906768f2bdc22fea45f064dcb5ef96cd78e0.tar.bz2 |
Merge "Clean up MHL local devices when HdmiControlService turns into disabled state" into lmp-dev
Diffstat (limited to 'services/core/java/com/android/server/hdmi')
-rw-r--r-- | services/core/java/com/android/server/hdmi/HdmiControlService.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java index efcc362..4f4c723 100644 --- a/services/core/java/com/android/server/hdmi/HdmiControlService.java +++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java @@ -356,7 +356,7 @@ public final class HdmiControlService extends SystemService { break; case Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED: tv().setAutoWakeup(enabled); - setOption(OPTION_CEC_AUTO_WAKEUP, toInt(enabled)); + setCecOption(OPTION_CEC_AUTO_WAKEUP, toInt(enabled)); break; case Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED: tv().setAutoDeviceOff(enabled); @@ -1687,11 +1687,17 @@ public final class HdmiControlService extends SystemService { } private void disableDevices(PendingActionClearedCallback callback) { - for (HdmiCecLocalDevice device : mCecController.getLocalDeviceList()) { - device.disableDevice(mStandbyMessageReceived, callback); + if (mCecController != null) { + for (HdmiCecLocalDevice device : mCecController.getLocalDeviceList()) { + device.disableDevice(mStandbyMessageReceived, callback); + } + if (isTvDevice()) { + unregisterSettingsObserver(); + } } - if (isTvDevice()) { - unregisterSettingsObserver(); + + if (mMhlController != null) { + mMhlController.clearAllLocalDevices(); } } @@ -1763,7 +1769,7 @@ public final class HdmiControlService extends SystemService { } @ServiceThreadOnly - void setOption(int key, int value) { + void setCecOption(int key, int value) { assertRunOnServiceThread(); mCecController.setOption(key, value); } |