Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f94c21c authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Allow dismissal of sensitive notification" into nyc-dev

parents 5a25783d 3c76d509
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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.