diff options
| author | 2024-12-01 18:13:50 -0800 | |
|---|---|---|
| committer | 2024-12-01 18:13:50 -0800 | |
| commit | 46759e76ca88e5df698b2da6321f0e8dc9091cfb (patch) | |
| tree | 36c928559afb14805bf0fae4ee155525a5f86972 | |
| parent | 39829012a7f68aee84cd413d0ac81b47e6de9c75 (diff) | |
[flexiglass] Set up initial doze state early
The attached bug occurs because the initial doze amount isn't being set
as soon as the Lockscreen scene is entered.
The fix is simple: set the initial doze amount when changing to the
Lockscreen scene, based on the KeyguardState.
Fix: 379848896
Test: manually verified by pressing the power button to enter AOD while
showing Bouncer but also when being unlocked and showing either Gone or
Shade
Flag: com.android.systemui.scene_container
Change-Id: I389ff51267ea84351b872455ffd5f0f928e3420b
| -rw-r--r-- | packages/SystemUI/src/com/android/keyguard/ClockEventController.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt index df9f7053c3f3..779c74f21f33 100644 --- a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt +++ b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt @@ -63,6 +63,7 @@ import com.android.systemui.plugins.clocks.WeatherData import com.android.systemui.plugins.clocks.ZenData import com.android.systemui.plugins.clocks.ZenData.ZenMode import com.android.systemui.res.R as SysuiR +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.settings.UserTracker import com.android.systemui.shared.regionsampling.RegionSampler import com.android.systemui.statusbar.policy.BatteryController @@ -465,6 +466,15 @@ constructor( batteryController.addCallback(batteryCallback) keyguardUpdateMonitor.registerCallback(keyguardUpdateMonitorCallback) zenModeController.addCallback(zenModeCallback) + if (SceneContainerFlag.isEnabled) { + handleDoze( + when (AOD) { + keyguardTransitionInteractor.getCurrentState() -> 1f + keyguardTransitionInteractor.getStartedState() -> 1f + else -> 0f + } + ) + } disposableHandle = parent.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.CREATED) { |