diff options
| author | 2022-10-11 16:08:21 +0000 | |
|---|---|---|
| committer | 2022-10-11 16:08:21 +0000 | |
| commit | 627ab4a1061513c5d0659f7f91484c0955a1e043 (patch) | |
| tree | 1956d3cd43b6b9e23f43ee1366798f874f5eb260 | |
| parent | 1c84342e6e30aa303caa05a95facec0fd4a38d87 (diff) | |
| parent | 9f3955ccfd7c745c5b1fc1cd6477b1470218cb6b (diff) | |
Merge "Fix existing dismissal surfaces, add one for lockscreen" into tm-qpr-dev am: a742754e6e am: 9f3955ccfd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20132294
Change-Id: I7231b25cdafce162d899d27924f6000071c6a011
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | core/java/android/service/notification/NotificationStats.java | 10 | ||||
| -rw-r--r-- | services/core/java/com/android/server/notification/NotificationRecordLogger.java | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/core/java/android/service/notification/NotificationStats.java b/core/java/android/service/notification/NotificationStats.java index 206e4fa4fb11..e5ad85cb526f 100644 --- a/core/java/android/service/notification/NotificationStats.java +++ b/core/java/android/service/notification/NotificationStats.java @@ -42,7 +42,8 @@ public final class NotificationStats implements Parcelable { /** @hide */ @IntDef(prefix = { "DISMISSAL_SURFACE_" }, value = { - DISMISSAL_NOT_DISMISSED, DISMISSAL_OTHER, DISMISSAL_PEEK, DISMISSAL_AOD, DISMISSAL_SHADE + DISMISSAL_NOT_DISMISSED, DISMISSAL_OTHER, DISMISSAL_PEEK, DISMISSAL_AOD, + DISMISSAL_SHADE, DISMISSAL_BUBBLE, DISMISSAL_LOCKSCREEN }) @Retention(RetentionPolicy.SOURCE) public @interface DismissalSurface {} @@ -75,7 +76,12 @@ public final class NotificationStats implements Parcelable { * Notification has been dismissed as a bubble. * @hide */ - public static final int DISMISSAL_BUBBLE = 3; + public static final int DISMISSAL_BUBBLE = 4; + /** + * Notification has been dismissed from the lock screen. + * @hide + */ + public static final int DISMISSAL_LOCKSCREEN = 5; /** @hide */ @IntDef(prefix = { "DISMISS_SENTIMENT_" }, value = { diff --git a/services/core/java/com/android/server/notification/NotificationRecordLogger.java b/services/core/java/com/android/server/notification/NotificationRecordLogger.java index 2789bcff0f68..ef1e11ccad55 100644 --- a/services/core/java/com/android/server/notification/NotificationRecordLogger.java +++ b/services/core/java/com/android/server/notification/NotificationRecordLogger.java @@ -177,11 +177,13 @@ public interface NotificationRecordLogger { NOTIFICATION_CANCEL_USER_PEEK(190), @UiEvent(doc = "Notification was canceled due to user dismissal from the always-on display") NOTIFICATION_CANCEL_USER_AOD(191), + @UiEvent(doc = "Notification was canceled due to user dismissal from a bubble") + NOTIFICATION_CANCEL_USER_BUBBLE(1228), + @UiEvent(doc = "Notification was canceled due to user dismissal from the lockscreen") + NOTIFICATION_CANCEL_USER_LOCKSCREEN(193), @UiEvent(doc = "Notification was canceled due to user dismissal from the notification" + " shade.") NOTIFICATION_CANCEL_USER_SHADE(192), - @UiEvent(doc = "Notification was canceled due to user dismissal from the lockscreen") - NOTIFICATION_CANCEL_USER_LOCKSCREEN(193), @UiEvent(doc = "Notification was canceled due to an assistant adjustment update.") NOTIFICATION_CANCEL_ASSISTANT(906); @@ -232,6 +234,10 @@ public interface NotificationRecordLogger { return NOTIFICATION_CANCEL_USER_AOD; case NotificationStats.DISMISSAL_SHADE: return NOTIFICATION_CANCEL_USER_SHADE; + case NotificationStats.DISMISSAL_BUBBLE: + return NOTIFICATION_CANCEL_USER_BUBBLE; + case NotificationStats.DISMISSAL_LOCKSCREEN: + return NOTIFICATION_CANCEL_USER_LOCKSCREEN; default: if (NotificationManagerService.DBG) { throw new IllegalArgumentException("Unexpected surface for user-dismiss " |