Merge "Merge "Shortened and adjustable screen timeouts" into qt-r1-dev am: 969c3d9b87" into qt-r1-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
706016714b
@@ -40,6 +40,9 @@
|
|||||||
<!-- Whether or not we show the number in the bar. -->
|
<!-- Whether or not we show the number in the bar. -->
|
||||||
<bool name="config_statusBarShowNumber">false</bool>
|
<bool name="config_statusBarShowNumber">false</bool>
|
||||||
|
|
||||||
|
<!-- For how long the lock screen can be on before the display turns off. -->
|
||||||
|
<integer name="config_lockScreenDisplayTimeout">10000</integer>
|
||||||
|
|
||||||
<!-- Vibrator pattern for camera gesture launch. -->
|
<!-- Vibrator pattern for camera gesture launch. -->
|
||||||
<integer-array translatable="false" name="config_cameraLaunchGestureVibePattern">
|
<integer-array translatable="false" name="config_cameraLaunchGestureVibePattern">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ public class DozeScreenState implements DozeMachine.Part {
|
|||||||
* Delay entering low power mode when animating to make sure that we'll have
|
* Delay entering low power mode when animating to make sure that we'll have
|
||||||
* time to move all elements into their final positions while still at 60 fps.
|
* time to move all elements into their final positions while still at 60 fps.
|
||||||
*/
|
*/
|
||||||
private static final int ENTER_DOZE_DELAY = 6000;
|
private static final int ENTER_DOZE_DELAY = 4000;
|
||||||
/**
|
/**
|
||||||
* Hide wallpaper earlier when entering low power mode. The gap between
|
* Hide wallpaper earlier when entering low power mode. The gap between
|
||||||
* hiding the wallpaper and changing the display mode is necessary to hide
|
* hiding the wallpaper and changing the display mode is necessary to hide
|
||||||
* the black frame that's inherent to hardware specs.
|
* the black frame that's inherent to hardware specs.
|
||||||
*/
|
*/
|
||||||
public static final int ENTER_DOZE_HIDE_WALLPAPER_DELAY = 4500;
|
public static final int ENTER_DOZE_HIDE_WALLPAPER_DELAY = 2500;
|
||||||
|
|
||||||
private final DozeMachine.Service mDozeService;
|
private final DozeMachine.Service mDozeService;
|
||||||
private final Handler mHandler;
|
private final Handler mHandler;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
/**
|
/**
|
||||||
* The default amount of time we stay awake (used for all key input)
|
* The default amount of time we stay awake (used for all key input)
|
||||||
*/
|
*/
|
||||||
public static final int AWAKE_INTERVAL_DEFAULT_MS = 10000;
|
public static final int AWAKE_INTERVAL_BOUNCER_MS = 10000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How long to wait after the screen turns off due to timeout before
|
* How long to wait after the screen turns off due to timeout before
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat
|
|||||||
private final DozeParameters mDozeParameters;
|
private final DozeParameters mDozeParameters;
|
||||||
private final WindowManager.LayoutParams mLpChanged;
|
private final WindowManager.LayoutParams mLpChanged;
|
||||||
private final boolean mKeyguardScreenRotation;
|
private final boolean mKeyguardScreenRotation;
|
||||||
|
private final long mLockScreenDisplayTimeout;
|
||||||
private ViewGroup mStatusBarView;
|
private ViewGroup mStatusBarView;
|
||||||
private WindowManager.LayoutParams mLp;
|
private WindowManager.LayoutParams mLp;
|
||||||
private boolean mHasTopUi;
|
private boolean mHasTopUi;
|
||||||
@@ -104,6 +105,8 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat
|
|||||||
mDozeParameters = dozeParameters;
|
mDozeParameters = dozeParameters;
|
||||||
mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze();
|
mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze();
|
||||||
mLpChanged = new WindowManager.LayoutParams();
|
mLpChanged = new WindowManager.LayoutParams();
|
||||||
|
mLockScreenDisplayTimeout = context.getResources()
|
||||||
|
.getInteger(R.integer.config_lockScreenDisplayTimeout);
|
||||||
((SysuiStatusBarStateController) Dependency.get(StatusBarStateController.class))
|
((SysuiStatusBarStateController) Dependency.get(StatusBarStateController.class))
|
||||||
.addCallback(mStateListener,
|
.addCallback(mStateListener,
|
||||||
SysuiStatusBarStateController.RANK_STATUS_BAR_WINDOW_CONTROLLER);
|
SysuiStatusBarStateController.RANK_STATUS_BAR_WINDOW_CONTROLLER);
|
||||||
@@ -280,7 +283,8 @@ public class StatusBarWindowController implements Callback, Dumpable, Configurat
|
|||||||
if (state.isKeyguardShowingAndNotOccluded()
|
if (state.isKeyguardShowingAndNotOccluded()
|
||||||
&& state.statusBarState == StatusBarState.KEYGUARD
|
&& state.statusBarState == StatusBarState.KEYGUARD
|
||||||
&& !state.qsExpanded) {
|
&& !state.qsExpanded) {
|
||||||
mLpChanged.userActivityTimeout = KeyguardViewMediator.AWAKE_INTERVAL_DEFAULT_MS;
|
mLpChanged.userActivityTimeout = state.bouncerShowing
|
||||||
|
? KeyguardViewMediator.AWAKE_INTERVAL_BOUNCER_MS : mLockScreenDisplayTimeout;
|
||||||
} else {
|
} else {
|
||||||
mLpChanged.userActivityTimeout = -1;
|
mLpChanged.userActivityTimeout = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user