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

* commit '5c14bc213be3e311c150b7cb86dc880937b3b7b7':
  Wake up device in the case a touch is encountered in theater mode when the screen is off and no dream is running.
This commit is contained in:
Bryce Lee
2014-11-12 01:21:13 +00:00
committed by android-build-merger
3 changed files with 13 additions and 0 deletions

View File

@@ -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. -->

View File

@@ -1576,6 +1576,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" />

View File

@@ -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;
}