diff options
author | Bryce Lee <brycelee@google.com> | 2014-11-11 23:59:32 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-11 23:59:34 +0000 |
commit | 68f97736e65f1be4664fd3c3765fc621f3b76c3a (patch) | |
tree | 68bfe6da9ad4da9e3556afcb7662d6dfdabe043e | |
parent | 5ad9b395db341b3360d481039f152f8ce1d8360c (diff) | |
parent | 812d7025d2d17b540b1c8d233dab1176d8c34fa7 (diff) | |
download | frameworks_base-68f97736e65f1be4664fd3c3765fc621f3b76c3a.zip frameworks_base-68f97736e65f1be4664fd3c3765fc621f3b76c3a.tar.gz frameworks_base-68f97736e65f1be4664fd3c3765fc621f3b76c3a.tar.bz2 |
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
-rw-r--r-- | core/res/res/values/config.xml | 2 | ||||
-rw-r--r-- | core/res/res/values/symbols.xml | 1 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 10 |
3 files changed, 13 insertions, 0 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index ebac30a..dcbc4ee 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -466,6 +466,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 fd3465a..7edefae 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1580,6 +1580,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 2ea1802..ddefb1f 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -522,6 +522,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; @@ -1232,6 +1233,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( @@ -4785,6 +4788,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; } |