Merge "Don't hide AOD icons if we're not in KEYGUARD but will be shortly due to the screen off animation." into sc-dev am: b5678c5ac0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15098663 Change-Id: Iad9981cebaf0b92875591b58830b26cdf6ef65d5
This commit is contained in:
@@ -71,6 +71,7 @@ public class NotificationIconAreaController implements
|
|||||||
private final DozeParameters mDozeParameters;
|
private final DozeParameters mDozeParameters;
|
||||||
private final Optional<Bubbles> mBubblesOptional;
|
private final Optional<Bubbles> mBubblesOptional;
|
||||||
private final StatusBarWindowController mStatusBarWindowController;
|
private final StatusBarWindowController mStatusBarWindowController;
|
||||||
|
private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
||||||
|
|
||||||
private int mIconSize;
|
private int mIconSize;
|
||||||
private int mIconHPadding;
|
private int mIconHPadding;
|
||||||
@@ -119,7 +120,8 @@ public class NotificationIconAreaController implements
|
|||||||
Optional<Bubbles> bubblesOptional,
|
Optional<Bubbles> bubblesOptional,
|
||||||
DemoModeController demoModeController,
|
DemoModeController demoModeController,
|
||||||
DarkIconDispatcher darkIconDispatcher,
|
DarkIconDispatcher darkIconDispatcher,
|
||||||
StatusBarWindowController statusBarWindowController) {
|
StatusBarWindowController statusBarWindowController,
|
||||||
|
UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) {
|
||||||
mContrastColorUtil = ContrastColorUtil.getInstance(context);
|
mContrastColorUtil = ContrastColorUtil.getInstance(context);
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mStatusBarStateController = statusBarStateController;
|
mStatusBarStateController = statusBarStateController;
|
||||||
@@ -133,6 +135,7 @@ public class NotificationIconAreaController implements
|
|||||||
mDemoModeController = demoModeController;
|
mDemoModeController = demoModeController;
|
||||||
mDemoModeController.addCallback(this);
|
mDemoModeController.addCallback(this);
|
||||||
mStatusBarWindowController = statusBarWindowController;
|
mStatusBarWindowController = statusBarWindowController;
|
||||||
|
mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController;
|
||||||
notificationListener.addNotificationSettingsListener(mSettingsListener);
|
notificationListener.addNotificationSettingsListener(mSettingsListener);
|
||||||
|
|
||||||
initializeNotificationAreaViews(context);
|
initializeNotificationAreaViews(context);
|
||||||
@@ -677,7 +680,12 @@ public class NotificationIconAreaController implements
|
|||||||
}
|
}
|
||||||
boolean visible = mBypassController.getBypassEnabled()
|
boolean visible = mBypassController.getBypassEnabled()
|
||||||
|| mWakeUpCoordinator.getNotificationsFullyHidden();
|
|| mWakeUpCoordinator.getNotificationsFullyHidden();
|
||||||
if (mStatusBarStateController.getState() != StatusBarState.KEYGUARD) {
|
|
||||||
|
// Hide the AOD icons if we're not in the KEYGUARD state unless the screen off animation is
|
||||||
|
// playing, in which case we want them to be visible since we're animating in the AOD UI and
|
||||||
|
// will be switching to KEYGUARD shortly.
|
||||||
|
if (mStatusBarStateController.getState() != StatusBarState.KEYGUARD
|
||||||
|
&& !mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying()) {
|
||||||
visible = false;
|
visible = false;
|
||||||
}
|
}
|
||||||
if (visible && mWakeUpCoordinator.isPulseExpanding()) {
|
if (visible && mWakeUpCoordinator.isPulseExpanding()) {
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase {
|
|||||||
DarkIconDispatcher mDarkIconDispatcher;
|
DarkIconDispatcher mDarkIconDispatcher;
|
||||||
@Mock
|
@Mock
|
||||||
StatusBarWindowController mStatusBarWindowController;
|
StatusBarWindowController mStatusBarWindowController;
|
||||||
|
@Mock
|
||||||
|
UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
||||||
private NotificationIconAreaController mController;
|
private NotificationIconAreaController mController;
|
||||||
@Mock
|
@Mock
|
||||||
private Bubbles mBubbles;
|
private Bubbles mBubbles;
|
||||||
@@ -87,7 +89,8 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase {
|
|||||||
Optional.of(mBubbles),
|
Optional.of(mBubbles),
|
||||||
mDemoModeController,
|
mDemoModeController,
|
||||||
mDarkIconDispatcher,
|
mDarkIconDispatcher,
|
||||||
mStatusBarWindowController);
|
mStatusBarWindowController,
|
||||||
|
mUnlockedScreenOffAnimationController);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user