am 9852ecd6: Merge "Fixed a bug where the clearable flag was set inconsistently" into lmp-mr1-dev
* commit '9852ecd6378be67c36010b415cffbc852e6a265f':
Fixed a bug where the clearable flag was set inconsistently
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 725a1a8..5613a6e 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 @@
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 f8332ea..7345440 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 void setStatusBarNotification(StatusBarNotification statusBarNotification) {
mStatusBarNotification = statusBarNotification;
+ updateVetoButton();
}
public StatusBarNotification getStatusBarNotification() {
@@ -303,17 +304,7 @@
* @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();
}
/**