Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +19 −24 Original line number Diff line number Diff line Loading @@ -826,9 +826,8 @@ public abstract class BaseStatusBar extends SystemUI implements } } protected View updateNotificationVetoButton(View row, StatusBarNotification n) { protected View bindVetoButtonClickListener(View row, StatusBarNotification n) { View vetoButton = row.findViewById(R.id.veto); if (n.isClearable()) { final String _pkg = n.getPackageName(); final String _tag = n.getTag(); final int _id = n.getId(); Loading @@ -846,10 +845,6 @@ public abstract class BaseStatusBar extends SystemUI implements } } }); vetoButton.setVisibility(View.VISIBLE); } else { vetoButton.setVisibility(View.GONE); } vetoButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); return vetoButton; } Loading Loading @@ -1368,7 +1363,7 @@ public abstract class BaseStatusBar extends SystemUI implements } workAroundBadLayerDrawableOpacity(row); View vetoButton = updateNotificationVetoButton(row, sbn); View vetoButton = bindVetoButtonClickListener(row, sbn); vetoButton.setContentDescription(mContext.getString( R.string.accessibility_remove_notification)); Loading Loading @@ -2008,7 +2003,7 @@ public abstract class BaseStatusBar extends SystemUI implements // Update the veto button accordingly (and as a result, whether this row is // swipe-dismissable) updateNotificationVetoButton(entry.row, notification); bindVetoButtonClickListener(entry.row, notification); if (DEBUG) { // Is this for you? Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −3 Original line number Diff line number Diff line Loading @@ -211,7 +211,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mStatusBarNotification = entry.notification; mPrivateLayout.onNotificationUpdated(entry); mPublicLayout.onNotificationUpdated(entry); updateVetoButton(); mShowingPublicInitialized = false; updateClearability(); if (mIsSummaryWithChildren) { recreateNotificationHeader(); } Loading Loading @@ -910,7 +911,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } mPrivateLayout.updateExpandButtons(isExpandable()); updateVetoButton(); updateClearability(); mShowingPublicInitialized = true; } Loading Loading @@ -946,7 +947,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } private void updateVetoButton() { private void updateClearability() { // public versions cannot be dismissed mVetoButton.setVisibility(isClearable() && !mShowingPublic ? View.VISIBLE : View.GONE); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +19 −24 Original line number Diff line number Diff line Loading @@ -826,9 +826,8 @@ public abstract class BaseStatusBar extends SystemUI implements } } protected View updateNotificationVetoButton(View row, StatusBarNotification n) { protected View bindVetoButtonClickListener(View row, StatusBarNotification n) { View vetoButton = row.findViewById(R.id.veto); if (n.isClearable()) { final String _pkg = n.getPackageName(); final String _tag = n.getTag(); final int _id = n.getId(); Loading @@ -846,10 +845,6 @@ public abstract class BaseStatusBar extends SystemUI implements } } }); vetoButton.setVisibility(View.VISIBLE); } else { vetoButton.setVisibility(View.GONE); } vetoButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); return vetoButton; } Loading Loading @@ -1368,7 +1363,7 @@ public abstract class BaseStatusBar extends SystemUI implements } workAroundBadLayerDrawableOpacity(row); View vetoButton = updateNotificationVetoButton(row, sbn); View vetoButton = bindVetoButtonClickListener(row, sbn); vetoButton.setContentDescription(mContext.getString( R.string.accessibility_remove_notification)); Loading Loading @@ -2008,7 +2003,7 @@ public abstract class BaseStatusBar extends SystemUI implements // Update the veto button accordingly (and as a result, whether this row is // swipe-dismissable) updateNotificationVetoButton(entry.row, notification); bindVetoButtonClickListener(entry.row, notification); if (DEBUG) { // Is this for you? Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −3 Original line number Diff line number Diff line Loading @@ -211,7 +211,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mStatusBarNotification = entry.notification; mPrivateLayout.onNotificationUpdated(entry); mPublicLayout.onNotificationUpdated(entry); updateVetoButton(); mShowingPublicInitialized = false; updateClearability(); if (mIsSummaryWithChildren) { recreateNotificationHeader(); } Loading Loading @@ -910,7 +911,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } mPrivateLayout.updateExpandButtons(isExpandable()); updateVetoButton(); updateClearability(); mShowingPublicInitialized = true; } Loading Loading @@ -946,7 +947,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } } private void updateVetoButton() { private void updateClearability() { // public versions cannot be dismissed mVetoButton.setVisibility(isClearable() && !mShowingPublic ? View.VISIBLE : View.GONE); } Loading