diff options
| author | 2016-02-23 00:55:58 +0000 | |
|---|---|---|
| committer | 2016-02-23 00:55:59 +0000 | |
| commit | 3f94c21c8ab4d0fed5a0f39eb64e5078c3c71b1b (patch) | |
| tree | c1980b59ed42abe52eac23aac55a306750f5f40f | |
| parent | 5a25783d3314a059c2b448b34e41aafcc78bbb10 (diff) | |
| parent | 3c76d509d362cf5086a63722ab41e04f5d539182 (diff) | |
Merge "Allow dismissal of sensitive notification" into nyc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java | 7 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index c73e115d9dd0..c72cec36a024 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -80,6 +80,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { /** Are we showing the "public" version */ private boolean mShowingPublic; private boolean mSensitive; + private boolean mSensitiveHiddenInGeneral; private boolean mShowingPublicInitialized; private boolean mHideSensitiveForIntrinsicHeight; @@ -1041,8 +1042,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { getShowingLayout().requestSelectLayout(needsAnimation || isUserLocked()); } - public void setSensitive(boolean sensitive) { + public void setSensitive(boolean sensitive, boolean hideSensitive) { mSensitive = sensitive; + mSensitiveHiddenInGeneral = hideSensitive; } public void setHideSensitiveForIntrinsicHeight(boolean hideSensitive) { @@ -1114,7 +1116,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private void updateClearability() { // public versions cannot be dismissed - mVetoButton.setVisibility(isClearable() && !mShowingPublic ? View.VISIBLE : View.GONE); + mVetoButton.setVisibility(isClearable() && (!mShowingPublic + || !mSensitiveHiddenInGeneral) ? View.VISIBLE : View.GONE); } public void setChildrenExpanded(boolean expanded, boolean animate) { 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 2e1855ca7c89..f815deaf6f66 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1416,7 +1416,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, if (showingPublic) { updatePublicContentView(ent, ent.notification); } - ent.row.setSensitive(sensitive); + ent.row.setSensitive(sensitive, hideSensitive); if (ent.autoRedacted && ent.legacy) { // TODO: Also fade this? Or, maybe easier (and better), provide a dark redacted form // for legacy auto redacted notifications. |