From a37774f098a5204947ff4b4787c4b753bb9016db Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 11 Nov 2014 19:16:18 +0100 Subject: [PATCH] Fixed a bug where the clearable flag was set inconsistently This could lead to undismissable notifications. Bug: 17758698 Change-Id: I60ccbe24686c5b8bc46bfb52e590cef71ed7a190 --- .../android/systemui/statusbar/BaseStatusBar.java | 2 -- .../statusbar/ExpandableNotificationRow.java | 13 ++----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 725a1a835175d..5613a6e42c2a9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -1486,8 +1486,6 @@ public abstract class BaseStatusBar extends SystemUI implements entry.autoRedacted = true; } - row.setClearable(sbn.isClearable()); - if (MULTIUSER_DEBUG) { TextView debug = (TextView) row.findViewById(R.id.debug_info); if (debug != null) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index f8332eae46b74..7345440ddfe0a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -118,6 +118,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void setStatusBarNotification(StatusBarNotification statusBarNotification) { mStatusBarNotification = statusBarNotification; + updateVetoButton(); } public StatusBarNotification getStatusBarNotification() { @@ -303,17 +304,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { * @return Can the underlying notification be cleared? */ public boolean isClearable() { - return mClearable; - } - - /** - * Set whether the notification can be cleared. - * - * @param clearable - */ - public void setClearable(boolean clearable) { - mClearable = clearable; - updateVetoButton(); + return mStatusBarNotification != null && mStatusBarNotification.isClearable(); } /**