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
This commit is contained in:
@@ -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. -->
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user