Allow keep showing to bypass bouncer
User experience improvement that alleviates the current bouncer bug with
the blocking helper (where users can't swipe after interacting with the
blocking helper).
Bug: 78222122
Test: Added test case, verified on device with lock screen pin + helper
Change-Id: I54806df8b960ea305b120aef6217a6b90f30590b
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
index ec49f43..be5e3f4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
@@ -91,22 +91,24 @@
private boolean mIsForBlockingHelper;
private boolean mNegativeUserSentiment;
- /** Counter tag that describes how the user exit or quit out of this view. */
- private String mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_DISMISSED;
+ /**
+ * String that describes how the user exit or quit out of this view, also used as a counter tag.
+ */
+ private String mExitReason = NotificationCounters.BLOCKING_HELPER_DISMISSED;
private OnClickListener mOnKeepShowing = v -> {
- mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_KEEP_SHOWING;
+ mExitReason = NotificationCounters.BLOCKING_HELPER_KEEP_SHOWING;
closeControls(v);
};
private OnClickListener mOnStopOrMinimizeNotifications = v -> {
- mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_STOP_NOTIFICATIONS;
+ mExitReason = NotificationCounters.BLOCKING_HELPER_STOP_NOTIFICATIONS;
swapContent(false);
};
private OnClickListener mOnUndo = v -> {
// Reset exit counter that we'll log and record an undo event separately (not an exit event)
- mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_DISMISSED;
+ mExitReason = NotificationCounters.BLOCKING_HELPER_DISMISSED;
logBlockingHelperCounter(NotificationCounters.BLOCKING_HELPER_UNDO);
swapContent(true);
};
@@ -300,7 +302,9 @@
private void saveImportance() {
if (!mIsNonblockable) {
- if (mCheckSaveListener != null) {
+ // Only go through the lock screen/bouncer if the user didn't hit 'Keep showing'.
+ if (mCheckSaveListener != null
+ && !NotificationCounters.BLOCKING_HELPER_KEEP_SHOWING.equals(mExitReason)) {
mCheckSaveListener.checkSave(this::updateImportance, mSbn);
} else {
updateImportance();
@@ -495,7 +499,7 @@
if (save) {
saveImportance();
}
- logBlockingHelperCounter(mExitReasonCounter);
+ logBlockingHelperCounter(mExitReason);
return false;
}