Loading core/java/android/hardware/display/AmbientDisplayConfiguration.java +5 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,11 @@ public class AmbientDisplayConfiguration { return !TextUtils.isEmpty(ambientDisplayComponent()); } /** {@hide} */ public boolean dozeSuppressed(int user) { return boolSettingDefaultOff(Settings.Secure.SUPPRESS_DOZE, user); } private boolean alwaysOnDisplayAvailable() { return mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnDisplayAvailable); } Loading packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java +1 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ public class DozeFactory { new DozeWallpaperState(mWallpaperManager, mBiometricUnlockController, mDozeParameters), new DozeDockHandler(config, machine, mDockManager), new DozeSuppressedHandler(dozeService, config, machine), new DozeAuthRemover(dozeService) }); Loading packages/SystemUI/src/com/android/systemui/doze/DozeLog.java +8 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,14 @@ public class DozeLog implements Dumpable { mLogger.logSensorTriggered(reason); } /** * Appends doze suppressed event to the logs * @param suppressedState The {@link DozeMachine.State} that was suppressed */ public void traceDozeSuppressed(DozeMachine.State suppressedState) { mLogger.logDozeSuppressed(suppressedState); } private class SummaryStats { private int mCount; Loading packages/SystemUI/src/com/android/systemui/doze/DozeLogger.kt +8 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,14 @@ class DozeLogger @Inject constructor( "Sensor triggered, type=${reasonToString(int1)}" }) } fun logDozeSuppressed(state: DozeMachine.State) { buffer.log(TAG, INFO, { str1 = state.name }, { "Doze state suppressed, state=$str1" }) } } private const val TAG = "DozeLog" Loading packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +9 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,10 @@ public class DozeMachine { } } boolean isAlwaysOn() { return this == DOZE_AOD || this == DOZE_AOD_DOCKED; } int screenState(DozeParameters parameters) { switch (this) { case UNINITIALIZED: Loading Loading @@ -324,6 +328,11 @@ public class DozeMachine { if (mState == State.FINISH) { return State.FINISH; } if (mConfig.dozeSuppressed(UserHandle.USER_CURRENT) && requestedState.isAlwaysOn()) { Log.i(TAG, "Doze is suppressed. Suppressing state: " + requestedState); mDozeLog.traceDozeSuppressed(requestedState); return State.DOZE; } if ((mState == State.DOZE_AOD_PAUSED || mState == State.DOZE_AOD_PAUSING || mState == State.DOZE_AOD || mState == State.DOZE) && requestedState == State.DOZE_PULSE_DONE) { Loading Loading
core/java/android/hardware/display/AmbientDisplayConfiguration.java +5 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,11 @@ public class AmbientDisplayConfiguration { return !TextUtils.isEmpty(ambientDisplayComponent()); } /** {@hide} */ public boolean dozeSuppressed(int user) { return boolSettingDefaultOff(Settings.Secure.SUPPRESS_DOZE, user); } private boolean alwaysOnDisplayAvailable() { return mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnDisplayAvailable); } Loading
packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java +1 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ public class DozeFactory { new DozeWallpaperState(mWallpaperManager, mBiometricUnlockController, mDozeParameters), new DozeDockHandler(config, machine, mDockManager), new DozeSuppressedHandler(dozeService, config, machine), new DozeAuthRemover(dozeService) }); Loading
packages/SystemUI/src/com/android/systemui/doze/DozeLog.java +8 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,14 @@ public class DozeLog implements Dumpable { mLogger.logSensorTriggered(reason); } /** * Appends doze suppressed event to the logs * @param suppressedState The {@link DozeMachine.State} that was suppressed */ public void traceDozeSuppressed(DozeMachine.State suppressedState) { mLogger.logDozeSuppressed(suppressedState); } private class SummaryStats { private int mCount; Loading
packages/SystemUI/src/com/android/systemui/doze/DozeLogger.kt +8 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,14 @@ class DozeLogger @Inject constructor( "Sensor triggered, type=${reasonToString(int1)}" }) } fun logDozeSuppressed(state: DozeMachine.State) { buffer.log(TAG, INFO, { str1 = state.name }, { "Doze state suppressed, state=$str1" }) } } private const val TAG = "DozeLog" Loading
packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java +9 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,10 @@ public class DozeMachine { } } boolean isAlwaysOn() { return this == DOZE_AOD || this == DOZE_AOD_DOCKED; } int screenState(DozeParameters parameters) { switch (this) { case UNINITIALIZED: Loading Loading @@ -324,6 +328,11 @@ public class DozeMachine { if (mState == State.FINISH) { return State.FINISH; } if (mConfig.dozeSuppressed(UserHandle.USER_CURRENT) && requestedState.isAlwaysOn()) { Log.i(TAG, "Doze is suppressed. Suppressing state: " + requestedState); mDozeLog.traceDozeSuppressed(requestedState); return State.DOZE; } if ((mState == State.DOZE_AOD_PAUSED || mState == State.DOZE_AOD_PAUSING || mState == State.DOZE_AOD || mState == State.DOZE) && requestedState == State.DOZE_PULSE_DONE) { Loading