summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}