summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2017-01-31 14:37:14 -0800
committer Selim Cinek <cinek@google.com> 2017-02-01 00:15:58 +0000
commit23301afb8e763fd378f3fe13000ee42c19fa25a6 (patch)
treed6460321ee401e06169bbddec23f494767ed7af2
parent66d545bfe9cbe07c81fd03a8806a1e300b508c06 (diff)
Fixed an issue where heads-upped notifications would stay
If a heads up notification was briefly removed right after it was added it could linger around in systemUI until the panel collapsed. We need to make sure not to apply this improvement if reordering isn't allowed, otherwise it will never time out Test: existing tests pass Bug: 34608075 Merged-In: I7768f6111ada30edcb997a42940e5e336efe1cf2 Change-Id: I7768f6111ada30edcb997a42940e5e336efe1cf2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 14868a5442d6..6cbb5e1a21dd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1582,8 +1582,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
if (mHeadsUpManager.isHeadsUp(key)) {
// A cancel() in repsonse to a remote input shouldn't be delayed, as it makes the
// sending look longer than it takes.
+ // Also we should not defer the removal if reordering isn't allowed since otherwise
+ // some notifications can't disappear before the panel is closed.
boolean ignoreEarliestRemovalTime = mRemoteInputController.isSpinning(key)
- && !FORCE_REMOTE_INPUT_HISTORY;
+ && !FORCE_REMOTE_INPUT_HISTORY
+ || !mVisualStabilityManager.isReorderingAllowed();
deferRemoval = !mHeadsUpManager.removeNotification(key, ignoreEarliestRemovalTime);
}
if (key.equals(mMediaNotificationKey)) {