diff options
author | Beverly <beverlyt@google.com> | 2021-10-05 20:05:31 -0400 |
---|---|---|
committer | Beverly Tai <beverlyt@google.com> | 2021-10-06 14:09:39 +0000 |
commit | 3fac0854c27c7d2feb23c1b99169e0a952088547 (patch) | |
tree | f0aa12e2a4a6ea64429746931ff0ccb93b21fac7 /packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java | |
parent | f9883800a34e51de2cfbc2666c635071fd8676de (diff) |
Update dozing state on clock view attached
Else, the clock may animate in at the wrong font weight.
Test: atest AnimatableClockControllerTest
Test: manually swipe away all notifications on LS,
see the large clock animate in at full font weight
Fixes: 201615075
Change-Id: I139e5a5c88551f23f99decff3e7ffc8bdaa5bba4
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index 464f65ba8b3c..7a01b4e8c971 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -20,6 +20,7 @@ import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import android.app.WallpaperManager; +import android.content.res.Resources; import android.text.TextUtils; import android.view.View; import android.widget.FrameLayout; @@ -30,6 +31,7 @@ import com.android.keyguard.clock.ClockManager; import com.android.systemui.R; import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.colorextraction.SysuiColorExtractor; +import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.keyguard.KeyguardUnlockAnimationController; import com.android.systemui.plugins.ClockPlugin; import com.android.systemui.plugins.statusbar.StatusBarStateController; @@ -65,6 +67,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private final BroadcastDispatcher mBroadcastDispatcher; private final BatteryController mBatteryController; private final LockscreenSmartspaceController mSmartspaceController; + private final Resources mResources; /** * Clock for both small and large sizes @@ -116,7 +119,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS KeyguardBypassController bypassController, LockscreenSmartspaceController smartspaceController, KeyguardUnlockAnimationController keyguardUnlockAnimationController, - SmartspaceTransitionController smartspaceTransitionController) { + SmartspaceTransitionController smartspaceTransitionController, + @Main Resources resources) { super(keyguardClockSwitch); mStatusBarStateController = statusBarStateController; mColorExtractor = colorExtractor; @@ -128,6 +132,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mKeyguardUpdateMonitor = keyguardUpdateMonitor; mBypassController = bypassController; mSmartspaceController = smartspaceController; + mResources = resources; mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mSmartspaceTransitionController = smartspaceTransitionController; @@ -157,7 +162,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, - mBypassController); + mBypassController, + mResources); mClockViewController.init(); mLargeClockViewController = @@ -167,7 +173,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mBroadcastDispatcher, mBatteryController, mKeyguardUpdateMonitor, - mBypassController); + mBypassController, + mResources); mLargeClockViewController.init(); } |