Merge "Allow dismissal of sensitive notification" into nyc-dev am: 3f94c21c8a
am: b0ae47f4a2
* commit 'b0ae47f4a2879e5a29bc0f3270186670dd0d55a3':
Allow dismissal of sensitive notification
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user