Merge "Fix existing dismissal surfaces, add one for lockscreen" into tm-qpr-dev

This commit is contained in:
Yuri Lin
2022-10-11 15:16:21 +00:00
committed by Android (Google) Code Review
2 changed files with 16 additions and 4 deletions

View File

@@ -42,7 +42,8 @@ public final class NotificationStats implements Parcelable {
/** @hide */ /** @hide */
@IntDef(prefix = { "DISMISSAL_SURFACE_" }, value = { @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) @Retention(RetentionPolicy.SOURCE)
public @interface DismissalSurface {} public @interface DismissalSurface {}
@@ -75,7 +76,12 @@ public final class NotificationStats implements Parcelable {
* Notification has been dismissed as a bubble. * Notification has been dismissed as a bubble.
* @hide * @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 */ /** @hide */
@IntDef(prefix = { "DISMISS_SENTIMENT_" }, value = { @IntDef(prefix = { "DISMISS_SENTIMENT_" }, value = {

View File

@@ -177,11 +177,13 @@ public interface NotificationRecordLogger {
NOTIFICATION_CANCEL_USER_PEEK(190), NOTIFICATION_CANCEL_USER_PEEK(190),
@UiEvent(doc = "Notification was canceled due to user dismissal from the always-on display") @UiEvent(doc = "Notification was canceled due to user dismissal from the always-on display")
NOTIFICATION_CANCEL_USER_AOD(191), 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" @UiEvent(doc = "Notification was canceled due to user dismissal from the notification"
+ " shade.") + " shade.")
NOTIFICATION_CANCEL_USER_SHADE(192), 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.") @UiEvent(doc = "Notification was canceled due to an assistant adjustment update.")
NOTIFICATION_CANCEL_ASSISTANT(906); NOTIFICATION_CANCEL_ASSISTANT(906);
@@ -232,6 +234,10 @@ public interface NotificationRecordLogger {
return NOTIFICATION_CANCEL_USER_AOD; return NOTIFICATION_CANCEL_USER_AOD;
case NotificationStats.DISMISSAL_SHADE: case NotificationStats.DISMISSAL_SHADE:
return NOTIFICATION_CANCEL_USER_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: default:
if (NotificationManagerService.DBG) { if (NotificationManagerService.DBG) {
throw new IllegalArgumentException("Unexpected surface for user-dismiss " throw new IllegalArgumentException("Unexpected surface for user-dismiss "