Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a152de0b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Notification API hardening: add statsd logs for forced auto-grouping events" into main

parents c5d91e7a f0ecea75
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@ option java_package com.android.server
27535 notification_adjusted (key|3),(adjustment_type|3),(new_value|3)
# when a notification cancellation is prevented by the system
27536 notification_cancel_prevented (key|3)
# when a summary notification is converted to a regular notification because of force autogrouping
27537 notification_summary_converted (key|3)

# ---------------------------
# Watchdog.java
+7 −0
Original line number Diff line number Diff line
@@ -6866,6 +6866,9 @@ public class NotificationManagerService extends SystemService {
            if (notificationForceGrouping()) {
                if (r.getSbn().isAppGroup()) {
                    mListeners.notifyPostedLocked(r, r);
                    mNotificationRecordLogger.log(
                        NotificationRecordLogger.NotificationEvent.NOTIFICATION_FORCE_GROUP, r);
                }
            }
        }
@@ -7046,6 +7049,10 @@ public class NotificationManagerService extends SystemService {
            // Clear summary flag
            StatusBarNotification sbn = r.getSbn();
            sbn.getNotification().flags = (r.mOriginalFlags & ~FLAG_GROUP_SUMMARY);
            EventLogTags.writeNotificationSummaryConverted(key);
            mNotificationRecordLogger.log(
                NotificationRecordLogger.NotificationEvent.NOTIFICATION_FORCE_GROUP_SUMMARY, r);
            return true;
        }
        return false;
+5 −1
Original line number Diff line number Diff line
@@ -313,7 +313,11 @@ interface NotificationRecordLogger {
        @UiEvent(doc = "Notification assistant generated notification action at 1 was clicked.")
        NOTIFICATION_ASSIST_ACTION_CLICKED_1(457),
        @UiEvent(doc = "Notification assistant generated notification action at 2 was clicked.")
        NOTIFICATION_ASSIST_ACTION_CLICKED_2(458);
        NOTIFICATION_ASSIST_ACTION_CLICKED_2(458),
        @UiEvent(doc = "Notification was force autogrouped.")
        NOTIFICATION_FORCE_GROUP(1843),
        @UiEvent(doc = "Notification summary was force autogrouped.")
        NOTIFICATION_FORCE_GROUP_SUMMARY(1844);

        private final int mId;
        NotificationEvent(int id) {