Merge "Recover AOD state when leaving battery saver" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f3736be0b3
@@ -490,6 +490,9 @@ public class DozeTriggers implements DozeMachine.Part {
|
|||||||
public void onPowerSaveChanged(boolean active) {
|
public void onPowerSaveChanged(boolean active) {
|
||||||
if (mDozeHost.isPowerSaveActive()) {
|
if (mDozeHost.isPowerSaveActive()) {
|
||||||
mMachine.requestState(DozeMachine.State.DOZE);
|
mMachine.requestState(DozeMachine.State.DOZE);
|
||||||
|
} else if (mMachine.getState() == DozeMachine.State.DOZE
|
||||||
|
&& mConfig.alwaysOnEnabled(UserHandle.USER_CURRENT)) {
|
||||||
|
mMachine.requestState(DozeMachine.State.DOZE_AOD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user