From 6241243ddfdba3d75bba6d07ccf3de3e83b9bc18 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 14 May 2018 20:08:47 -0700 Subject: [PATCH] Removing notifications that were kept around longer on click Previously we were only removing them if it had auto-cancel set, but that doesn't really make sense. Change-Id: Iaed7ddd46d490edc0b32ada235d1b742e6d768b7 Fixes: 76410797 Test: add notification without auto cancel and reply on it to keep it around, observe it goes away after click --- .../src/com/android/systemui/statusbar/phone/StatusBar.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 5f0759974709a..5f2bd92d67754 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -5187,7 +5187,9 @@ public class StatusBar extends SystemUI implements DemoMode, if (parentToCancelFinal != null) { removeNotification(parentToCancelFinal); } - if (shouldAutoCancel(sbn)) { + if (shouldAutoCancel(sbn) + || mRemoteInputManager.getKeysKeptForRemoteInput().contains( + notificationKey)) { // Automatically remove all notifications that we may have kept around longer removeNotification(sbn); }