summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
diff options
context:
space:
mode:
authorBeverly <beverlyt@google.com>2020-10-22 18:44:20 -0400
committerBeverly <beverlyt@google.com>2020-10-23 14:25:59 -0400
commit0d1743124da587cf24bf970b562137d630cddad3 (patch)
tree93870a638e67b9e01db6379c9516189ad51e4d0b /packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
parentdf1d9b98d626a2d1aa3d781252cabbab5d987b38 (diff)
Uncenter aod icons for new lockscreen
Also moves setup of aod icons to KeyguardStatusViewController instead of through Status Bar => NotificationPanelViewController. To enable the new lockscreen (value = 0 is disabled, value = 1 is enabled): adb shell settings put global show_new_lockscreen <value> Test: atest NotificationIconControllerTest Test: atest SystemUITests Bug: 170228350 Change-Id: I93d19823620051e969e8790c8946bdc15a5ab379
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
index 0a57b09a5541..0f0df7f697e1 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java
@@ -27,6 +27,8 @@ import com.android.systemui.statusbar.notification.AnimatableProperty;
import com.android.systemui.statusbar.notification.PropertyAnimator;
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
+import com.android.systemui.statusbar.phone.NotificationIconAreaController;
+import com.android.systemui.statusbar.phone.NotificationIconContainer;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.util.ViewController;
@@ -50,8 +52,10 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
private final KeyguardStateController mKeyguardStateController;
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
private final ConfigurationController mConfigurationController;
+ private final NotificationIconAreaController mNotificationIconAreaController;
private boolean mKeyguardStatusViewAnimating;
+ private int mLockScreenMode = KeyguardUpdateMonitor.LOCK_SCREEN_MODE_NORMAL;
@Inject
public KeyguardStatusViewController(
@@ -60,13 +64,15 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
KeyguardClockSwitchController keyguardClockSwitchController,
KeyguardStateController keyguardStateController,
KeyguardUpdateMonitor keyguardUpdateMonitor,
- ConfigurationController configurationController) {
+ ConfigurationController configurationController,
+ NotificationIconAreaController notificationIconAreaController) {
super(keyguardStatusView);
mKeyguardSliceViewController = keyguardSliceViewController;
mKeyguardClockSwitchController = keyguardClockSwitchController;
mKeyguardStateController = keyguardStateController;
mKeyguardUpdateMonitor = keyguardUpdateMonitor;
mConfigurationController = configurationController;
+ mNotificationIconAreaController = notificationIconAreaController;
}
@Override
@@ -78,6 +84,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
protected void onViewAttached() {
mKeyguardUpdateMonitor.registerCallback(mInfoCallback);
mConfigurationController.addCallback(mConfigurationListener);
+ updateAodIcons();
}
@Override
@@ -248,6 +255,17 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
mKeyguardClockSwitchController.refresh();
}
+ private void updateAodIcons() {
+ NotificationIconContainer nic = (NotificationIconContainer)
+ mView.findViewById(com.android.systemui.R.id.clock_notification_icon_container);
+ if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_NORMAL) {
+ // alternate icon area is set in KeyguardClockSwitchController
+ mNotificationIconAreaController.setupAodIcons(nic, mLockScreenMode);
+ } else {
+ nic.setVisibility(View.GONE);
+ }
+ }
+
private final ConfigurationController.ConfigurationListener mConfigurationListener =
new ConfigurationController.ConfigurationListener() {
@Override
@@ -265,8 +283,10 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
private KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() {
@Override
public void onLockScreenModeChanged(int mode) {
+ mLockScreenMode = mode;
mKeyguardClockSwitchController.updateLockScreenMode(mode);
mKeyguardSliceViewController.updateLockScreenMode(mode);
+ updateAodIcons();
}
@Override