diff options
| author | 2020-06-30 03:13:42 +0000 | |
|---|---|---|
| committer | 2020-06-30 03:13:42 +0000 | |
| commit | 821c274e1d5086de2419bc20f0a0c6e8bc500464 (patch) | |
| tree | 3c163f22cdf3c6c0a99ae284680378ccdbf71cca | |
| parent | 12c32eb6c97a29ab085201cf2eab40866eba1460 (diff) | |
| parent | 1736a32fd4f63938e6a3e83dc6434ae342462c3f (diff) | |
Merge "Hide bubble HUNs after unlock with face auth / bypass enabled" into rvc-dev am: d51f4018a9 am: 1736a32fd4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12037664
Change-Id: I1d8f3cff7e1a4795f2c567e849c21a39986fef89
3 files changed, 14 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java index b846aa08c33b..eca4c8082dfe 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java @@ -316,7 +316,7 @@ public abstract class AlertingNotificationManager implements NotificationLifetim * of the timer and should be removed externally. * @return true if the notification is sticky */ - protected boolean isSticky() { + public boolean isSticky() { return false; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java index 3dcf7ed674c7..e05ba12781c4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java @@ -428,7 +428,7 @@ public class HeadsUpManagerPhone extends HeadsUpManager implements Dumpable, @Override - protected boolean isSticky() { + public boolean isSticky() { return super.isSticky() || mMenuShownPinned; } @@ -568,6 +568,17 @@ public class HeadsUpManagerPhone extends HeadsUpManager implements Dumpable, } mKeysToRemoveWhenLeavingKeyguard.clear(); } + if (wasKeyguard && !isKeyguard && mBypassController.getBypassEnabled()) { + ArrayList<String> keysToRemove = new ArrayList<>(); + for (AlertEntry entry : mAlertEntries.values()) { + if (entry.mEntry != null && entry.mEntry.isBubble() && !entry.isSticky()) { + keysToRemove.add(entry.mEntry.getKey()); + } + } + for (String key : keysToRemove) { + removeAlertEntry(key); + } + } } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java index 0d5a14960850..07de388598b7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java @@ -368,7 +368,7 @@ public abstract class HeadsUpManager extends AlertingNotificationManager { protected boolean expanded; @Override - protected boolean isSticky() { + public boolean isSticky() { return (mEntry.isRowPinned() && expanded) || remoteInputActive || hasFullScreenIntent(mEntry); } |