summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryce Lee <brycelee@google.com>2014-11-12 03:45:20 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-12 03:45:20 +0000
commit1c53c20c276d98e5bb37f1351063368debcf3783 (patch)
treef5aa803fdfcaf2a3887626c462c9ffbeb97edca4
parent57e0d099fbae470d6759ac1cd4e801cee14b4997 (diff)
parent358d19065b0e32ee4d48f26477cf917856e46359 (diff)
downloadframeworks_base-1c53c20c276d98e5bb37f1351063368debcf3783.zip
frameworks_base-1c53c20c276d98e5bb37f1351063368debcf3783.tar.gz
frameworks_base-1c53c20c276d98e5bb37f1351063368debcf3783.tar.bz2
am 358d1906: Merge "Wake up device in the case a touch is encountered in theater mode when the screen is off and no dream is running." into lmp-sprout-dev automerge: 68f9773 automerge: 5c14bc2 automerge: 70532bf
* commit '358d19065b0e32ee4d48f26477cf917856e46359': Wake up device in the case a touch is encountered in theater mode when the screen is off and no dream is running.
-rw-r--r--core/res/res/values/config.xml2
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java10
3 files changed, 13 insertions, 0 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index afdfcd4..68ce666 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -467,6 +467,8 @@
<bool name="config_allowTheaterModeWakeFromKey">false</bool>
<!-- If this is true, allow wake from theater mode from motion. -->
<bool name="config_allowTheaterModeWakeFromMotion">false</bool>
+ <!-- If this is true, allow wake from theater mode from motion. -->
+ <bool name="config_allowTheaterModeWakeFromMotionWhenNotDreaming">false</bool>
<!-- If this is true, allow wake from theater mode from lid switch. -->
<bool name="config_allowTheaterModeWakeFromLidSwitch">false</bool>
<!-- If this is true, allow wake from theater mode when docked. -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index fc4f77d..69a244d 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1579,6 +1579,7 @@
<java-symbol type="bool" name="config_allowTheaterModeWakeFromPowerKey" />
<java-symbol type="bool" name="config_allowTheaterModeWakeFromKey" />
<java-symbol type="bool" name="config_allowTheaterModeWakeFromMotion" />
+ <java-symbol type="bool" name="config_allowTheaterModeWakeFromMotionWhenNotDreaming" />
<java-symbol type="bool" name="config_allowTheaterModeWakeFromLidSwitch" />
<java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" />
<java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" />
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index f1d1ae5..1ead800 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -525,6 +525,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
private boolean mAllowTheaterModeWakeFromKey;
private boolean mAllowTheaterModeWakeFromPowerKey;
private boolean mAllowTheaterModeWakeFromMotion;
+ private boolean mAllowTheaterModeWakeFromMotionWhenNotDreaming;
private boolean mAllowTheaterModeWakeFromCameraLens;
private boolean mAllowTheaterModeWakeFromLidSwitch;
private boolean mAllowTheaterModeWakeFromWakeGesture;
@@ -1235,6 +1236,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
com.android.internal.R.bool.config_allowTheaterModeWakeFromPowerKey);
mAllowTheaterModeWakeFromMotion = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_allowTheaterModeWakeFromMotion);
+ mAllowTheaterModeWakeFromMotionWhenNotDreaming = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_allowTheaterModeWakeFromMotionWhenNotDreaming);
mAllowTheaterModeWakeFromCameraLens = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_allowTheaterModeWakeFromCameraLens);
mAllowTheaterModeWakeFromLidSwitch = mContext.getResources().getBoolean(
@@ -4782,6 +4785,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return ACTION_PASS_TO_USER;
}
+ // If we have not passed the action up and we are in theater mode without dreaming,
+ // there will be no dream to intercept the touch and wake into ambient. The device should
+ // wake up in this case.
+ if (isTheaterModeEnabled() && (policyFlags & FLAG_WAKE) != 0) {
+ wakeUp(whenNanos / 1000000, mAllowTheaterModeWakeFromMotionWhenNotDreaming);
+ }
+
return 0;
}