diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | 8 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index 794eeda86b0f..1db0ab65e44f 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -315,6 +315,14 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV } /** + * Returns true if the large clock will block the notification shelf in AOD + */ + public boolean isLargeClockBlockingNotificationShelf() { + ClockController clock = mKeyguardClockSwitchController.getClock(); + return clock != null && clock.getLargeClock().getConfig().getHasCustomWeatherDataDisplay(); + } + + /** * Updates the alignment of the KeyguardStatusView and animates the transition if requested. */ public void updateAlignment( diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index 0fdd7ca1564f..784a36092922 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -1570,6 +1570,12 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump // When media is visible, it overlaps with the large clock. Use small clock instead. return SMALL; } + // To prevent the weather clock from overlapping with the notification shelf on AOD, we use + // the small clock here + if (mKeyguardStatusViewController.isLargeClockBlockingNotificationShelf() + && hasVisibleNotifications() && isOnAod()) { + return SMALL; + } return LARGE; } |