diff options
author | Beverly <beverlyt@google.com> | 2021-07-21 10:49:41 -0400 |
---|---|---|
committer | Beverly <beverlyt@google.com> | 2021-07-21 10:51:28 -0400 |
commit | 346acd492077d03937a00261f6744df86c2fcd98 (patch) | |
tree | 5fdcaa48b3bae3abf6da4c74fe719184852ad57f /packages/SystemUI/src | |
parent | 72922c8a85af2e0e834ff3de52d05510b191bddb (diff) |
Rely on the dozeAmount changes for mIsDozing
The large clock view can be attached while the
doze transition is happening, so we don't want to
mistakently set mIsDozing=false from StatusBarStateController#isDozing
when we should be relying on the update from onDozeAmountChanged.
Test: manual
Fixes: 194277812
Change-Id: I202b9d845194f9d97d8ac1d6d1ff7e3f78491fd7
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java b/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java index c89cda98c8a5..92f89d6b90fd 100644 --- a/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +++ b/packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java @@ -134,11 +134,15 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie }; @Override + protected void onInit() { + mIsDozing = mStatusBarStateController.isDozing(); + } + + @Override protected void onViewAttached() { updateLocale(); mBroadcastDispatcher.registerReceiver(mLocaleBroadcastReceiver, new IntentFilter(Intent.ACTION_LOCALE_CHANGED)); - mIsDozing = mStatusBarStateController.isDozing(); mDozeAmount = mStatusBarStateController.getDozeAmount(); mBatteryController.addCallback(mBatteryCallback); mKeyguardUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback); |