summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
diff options
context:
space:
mode:
authorShan Huang <shanh@google.com>2021-04-08 12:43:13 +0800
committerShan Huang <shanh@google.com>2021-04-12 21:23:26 +0800
commite0362426ebc1d1e10d32616ed88e9227718a5ba8 (patch)
tree5f13bf45a727a66da8d6b0a3725b0c208a020d80 /packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
parentb4f9164e5c7577e0c816ad660df1bc8aa5ca7873 (diff)
Animate LockScreen and AOD clock text for charging events
Test: Manual Bug: 182719493 Change-Id: I57f7cd834a08d8846a35cdf731611fc7a239b85a
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
index 874b4d9f95e9..032ed7da0a46 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -49,6 +49,7 @@ import com.android.systemui.statusbar.notification.PropertyAnimator;
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
import com.android.systemui.statusbar.phone.NotificationIconAreaController;
import com.android.systemui.statusbar.phone.NotificationIconContainer;
+import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.util.ViewController;
import java.util.Locale;
@@ -70,6 +71,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
private final KeyguardSliceViewController mKeyguardSliceViewController;
private final NotificationIconAreaController mNotificationIconAreaController;
private final BroadcastDispatcher mBroadcastDispatcher;
+ private final BatteryController mBatteryController;
/**
* Clock for both small and large sizes
@@ -118,7 +120,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
BroadcastDispatcher broadcastDispatcher,
PluginManager pluginManager,
FeatureFlags featureFlags,
- @Main Executor uiExecutor) {
+ @Main Executor uiExecutor,
+ BatteryController batteryController) {
super(keyguardClockSwitch);
mResources = resources;
mStatusBarStateController = statusBarStateController;
@@ -130,6 +133,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
mPluginManager = pluginManager;
mIsSmartspaceEnabled = featureFlags.isSmartspaceEnabled();
mUiExecutor = uiExecutor;
+ mBatteryController = batteryController;
}
/**
@@ -156,14 +160,16 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
new AnimatableClockController(
mView.findViewById(R.id.animatable_clock_view),
mStatusBarStateController,
- mBroadcastDispatcher);
+ mBroadcastDispatcher,
+ mBatteryController);
mClockViewController.init();
mLargeClockViewController =
new AnimatableClockController(
mView.findViewById(R.id.animatable_clock_view_large),
mStatusBarStateController,
- mBroadcastDispatcher);
+ mBroadcastDispatcher,
+ mBatteryController);
mLargeClockViewController.init();
// If a smartspace plugin is detected, replace the existing smartspace