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
* commit '68f97736e65f1be4664fd3c3765fc621f3b76c3a':
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:
@@ -467,6 +467,8 @@
|
|||||||
<bool name="config_allowTheaterModeWakeFromKey">false</bool>
|
<bool name="config_allowTheaterModeWakeFromKey">false</bool>
|
||||||
<!-- If this is true, allow wake from theater mode from motion. -->
|
<!-- If this is true, allow wake from theater mode from motion. -->
|
||||||
<bool name="config_allowTheaterModeWakeFromMotion">false</bool>
|
<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. -->
|
<!-- If this is true, allow wake from theater mode from lid switch. -->
|
||||||
<bool name="config_allowTheaterModeWakeFromLidSwitch">false</bool>
|
<bool name="config_allowTheaterModeWakeFromLidSwitch">false</bool>
|
||||||
<!-- If this is true, allow wake from theater mode when docked. -->
|
<!-- If this is true, allow wake from theater mode when docked. -->
|
||||||
|
|||||||
@@ -1576,6 +1576,7 @@
|
|||||||
<java-symbol type="bool" name="config_allowTheaterModeWakeFromPowerKey" />
|
<java-symbol type="bool" name="config_allowTheaterModeWakeFromPowerKey" />
|
||||||
<java-symbol type="bool" name="config_allowTheaterModeWakeFromKey" />
|
<java-symbol type="bool" name="config_allowTheaterModeWakeFromKey" />
|
||||||
<java-symbol type="bool" name="config_allowTheaterModeWakeFromMotion" />
|
<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_allowTheaterModeWakeFromLidSwitch" />
|
||||||
<java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" />
|
<java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" />
|
||||||
<java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" />
|
<java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" />
|
||||||
|
|||||||
@@ -525,6 +525,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
private boolean mAllowTheaterModeWakeFromKey;
|
private boolean mAllowTheaterModeWakeFromKey;
|
||||||
private boolean mAllowTheaterModeWakeFromPowerKey;
|
private boolean mAllowTheaterModeWakeFromPowerKey;
|
||||||
private boolean mAllowTheaterModeWakeFromMotion;
|
private boolean mAllowTheaterModeWakeFromMotion;
|
||||||
|
private boolean mAllowTheaterModeWakeFromMotionWhenNotDreaming;
|
||||||
private boolean mAllowTheaterModeWakeFromCameraLens;
|
private boolean mAllowTheaterModeWakeFromCameraLens;
|
||||||
private boolean mAllowTheaterModeWakeFromLidSwitch;
|
private boolean mAllowTheaterModeWakeFromLidSwitch;
|
||||||
private boolean mAllowTheaterModeWakeFromWakeGesture;
|
private boolean mAllowTheaterModeWakeFromWakeGesture;
|
||||||
@@ -1235,6 +1236,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
com.android.internal.R.bool.config_allowTheaterModeWakeFromPowerKey);
|
com.android.internal.R.bool.config_allowTheaterModeWakeFromPowerKey);
|
||||||
mAllowTheaterModeWakeFromMotion = mContext.getResources().getBoolean(
|
mAllowTheaterModeWakeFromMotion = mContext.getResources().getBoolean(
|
||||||
com.android.internal.R.bool.config_allowTheaterModeWakeFromMotion);
|
com.android.internal.R.bool.config_allowTheaterModeWakeFromMotion);
|
||||||
|
mAllowTheaterModeWakeFromMotionWhenNotDreaming = mContext.getResources().getBoolean(
|
||||||
|
com.android.internal.R.bool.config_allowTheaterModeWakeFromMotionWhenNotDreaming);
|
||||||
mAllowTheaterModeWakeFromCameraLens = mContext.getResources().getBoolean(
|
mAllowTheaterModeWakeFromCameraLens = mContext.getResources().getBoolean(
|
||||||
com.android.internal.R.bool.config_allowTheaterModeWakeFromCameraLens);
|
com.android.internal.R.bool.config_allowTheaterModeWakeFromCameraLens);
|
||||||
mAllowTheaterModeWakeFromLidSwitch = mContext.getResources().getBoolean(
|
mAllowTheaterModeWakeFromLidSwitch = mContext.getResources().getBoolean(
|
||||||
@@ -4782,6 +4785,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
return ACTION_PASS_TO_USER;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user