summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yuncheol Heo <ycheo@google.com> 2014-08-07 11:45:39 +0900
committer Yuncheol Heo <ycheo@google.com> 2014-08-07 17:30:08 +0900
commit2849b7ccd1cf973f862dd9b95355afbc9ca9268b (patch)
tree71557fbd3f2f1f117a81f5ac535e3faf51875605
parentdf9f0a321e0cb2958c9d170395a0367a106fa0e6 (diff)
Go to nap when receiving <Active Source> for the other devices.
- Previously, it went to sleep when it got <Active Source>, but this causes the other side-effects like can't-wake-up when changing to HDMI port directly. Bug: 15578870 Change-Id: I0ca5bd2372c9e5e7446592d66483900eeba75500
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java2
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiControlService.java5
2 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
index 7dc51a81e750..ae7fd8243418 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java
@@ -140,7 +140,7 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice {
if (physicalAddress != mService.getPhysicalAddress()) {
mIsActiveSource = false;
if (mService.isPowerOnOrTransient()) {
- mService.standby();
+ mService.nap();
}
return true;
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index e8d81928d1af..cccc44c23e02 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -1451,6 +1451,11 @@ public final class HdmiControlService extends SystemService {
// the intent, the sequence will continue at onStandby().
}
+ void nap() {
+ PowerManager pm = (PowerManager) getContext().getSystemService(Context.POWER_SERVICE);
+ pm.nap(SystemClock.uptimeMillis());
+ }
+
@ServiceThreadOnly
private void onWakeUp() {
assertRunOnServiceThread();