Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +2 −0 Original line number Diff line number Diff line Loading @@ -1097,6 +1097,8 @@ public abstract class BaseStatusBar extends SystemUI implements entry.autoRedacted = true; } row.setClearable(sbn.isClearable()); row.setDrawingCacheEnabled(true); if (MULTIUSER_DEBUG) { Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +25 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private NotificationContentView mPrivateLayout; private int mMaxExpandHeight; private View mVetoButton; private boolean mClearable; public ExpandableNotificationRow(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -165,6 +166,23 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { notifyHeightChanged(); } /** * @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(); } /** * Apply an expansion state to the layout. */ Loading Loading @@ -223,6 +241,13 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { // TODO: animation? mPublicLayout.setVisibility(show ? View.VISIBLE : View.GONE); mPrivateLayout.setVisibility(show ? View.GONE : View.VISIBLE); updateVetoButton(); } private void updateVetoButton() { // public versions cannot be dismissed mVetoButton.setVisibility(isClearable() && !mShowingPublic ? View.VISIBLE : View.GONE); } public int getMaxExpandHeight() { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +2 −0 Original line number Diff line number Diff line Loading @@ -1097,6 +1097,8 @@ public abstract class BaseStatusBar extends SystemUI implements entry.autoRedacted = true; } row.setClearable(sbn.isClearable()); row.setDrawingCacheEnabled(true); if (MULTIUSER_DEBUG) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +25 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private NotificationContentView mPrivateLayout; private int mMaxExpandHeight; private View mVetoButton; private boolean mClearable; public ExpandableNotificationRow(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -165,6 +166,23 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { notifyHeightChanged(); } /** * @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(); } /** * Apply an expansion state to the layout. */ Loading Loading @@ -223,6 +241,13 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { // TODO: animation? mPublicLayout.setVisibility(show ? View.VISIBLE : View.GONE); mPrivateLayout.setVisibility(show ? View.GONE : View.VISIBLE); updateVetoButton(); } private void updateVetoButton() { // public versions cannot be dismissed mVetoButton.setVisibility(isClearable() && !mShowingPublic ? View.VISIBLE : View.GONE); } public int getMaxExpandHeight() { Loading