From 9f515695aeb4c12a543c7bcc1555f66a1b6ba859 Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 20 Nov 2020 10:38:37 -0500 Subject: [PATCH] Use logout button + owner for max # notifs calc In the calculation for the max # notifications to show on the lock screen, take into consideration the height of the logout button and owner information. Test: atest SystemUITests, manual Bug: 170228350 Change-Id: Ia12c85df27b16d432608fef8a52eb0d4c9ff79ff --- .../src/com/android/keyguard/KeyguardStatusView.java | 7 +++++++ .../keyguard/KeyguardStatusViewController.java | 7 +++++++ .../com/android/keyguard/KeyguardUpdateMonitor.java | 12 ++++++++++-- .../phone/NotificationPanelViewController.java | 2 ++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java index 2036b3321bdaa..97aa26fb7f68d 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java @@ -178,6 +178,13 @@ public class KeyguardStatusView extends GridLayout { return mLogoutView.getVisibility() == VISIBLE ? mLogoutView.getHeight() : 0; } + int getOwnerInfoHeight() { + if (mOwnerInfo == null) { + return 0; + } + return mOwnerInfo.getVisibility() == VISIBLE ? mOwnerInfo.getHeight() : 0; + } + void updateLogoutView() { if (mLogoutView == null) { return; diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index dcb306e6110a7..c0e06e87b7539 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -129,6 +129,13 @@ public class KeyguardStatusViewController extends ViewController