diff options
author | Jinsuk Kim <jinsukkim@google.com> | 2015-05-07 07:12:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-07 07:12:20 +0000 |
commit | dd0f3964ef0bb6c04eb295119a2c7355125332d0 (patch) | |
tree | 982ea0b32664e99ca94f9c7dc48558298b45b3dc /services/core/java/com/android/server/hdmi | |
parent | 38de061b8b3953f7c211e75b4f7a5e22bd41711a (diff) | |
parent | 659c486beb0ccdf53a9176cb5c2c3e7c9acf8f50 (diff) | |
download | frameworks_base-dd0f3964ef0bb6c04eb295119a2c7355125332d0.zip frameworks_base-dd0f3964ef0bb6c04eb295119a2c7355125332d0.tar.gz frameworks_base-dd0f3964ef0bb6c04eb295119a2c7355125332d0.tar.bz2 |
Merge "CEC: Make wakeup on hotplug optional" into mnc-dev
Diffstat (limited to 'services/core/java/com/android/server/hdmi')
-rw-r--r-- | services/core/java/com/android/server/hdmi/Constants.java | 4 | ||||
-rw-r--r-- | services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/hdmi/Constants.java b/services/core/java/com/android/server/hdmi/Constants.java index e434f39..8c12060 100644 --- a/services/core/java/com/android/server/hdmi/Constants.java +++ b/services/core/java/com/android/server/hdmi/Constants.java @@ -214,6 +214,10 @@ final class Constants { // values which denotes the device type in HDMI Spec 1.4. static final String PROPERTY_DEVICE_TYPE = "ro.hdmi.device_type"; + // TODO(OEM): Set this to false to keep the playback device in sleep upon hotplug event. + // True by default. + static final String PROPERTY_WAKE_ON_HOTPLUG = "ro.hdmi.wake_on_hotplug"; + // Set to false to allow playback device to go to suspend mode even // when it's an active source. True by default. static final String PROPERTY_KEEP_AWAKE = "persist.sys.hdmi.keep_awake"; diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java index 89ffe45..fd3364a 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java @@ -34,6 +34,9 @@ import com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly; final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { private static final String TAG = "HdmiCecLocalDevicePlayback"; + private static final boolean WAKE_ON_HOTPLUG = + SystemProperties.getBoolean(Constants.PROPERTY_WAKE_ON_HOTPLUG, true); + private boolean mIsActiveSource = false; // Used to keep the device awake while it is the active source. For devices that @@ -130,7 +133,7 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { assertRunOnServiceThread(); mCecMessageCache.flushAll(); // We'll not clear mIsActiveSource on the hotplug event to pass CETC 11.2.2-2 ~ 3. - if (connected && mService.isPowerStandbyOrTransient()) { + if (WAKE_ON_HOTPLUG && connected && mService.isPowerStandbyOrTransient()) { mService.wakeUp(); } if (!connected) { |