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

Commit 925c00b4 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "also log user-initiated notification collapse events" into...

Merge "Merge "also log user-initiated notification collapse events" into oc-mr1-dev am: e72e8b15 am: bd4d6ded"
parents 06b47e2a fc47cb30
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ message MetricsEvent {
    // The view became hidden.
    // The view became hidden.
    TYPE_CLOSE = 2;
    TYPE_CLOSE = 2;


    // The view switched to detail mode (most relevant for quick settings tiles)
    // The view switched to detail mode (most relevant for quick settings tiles and notifications)
    TYPE_DETAIL = 3;
    TYPE_DETAIL = 3;


    // The view or control was activated.
    // The view or control was activated.
@@ -70,6 +70,9 @@ message MetricsEvent {
    // Type for APP_TRANSITION_REPORTED_DRAWN event: The activity was started with restoring from
    // Type for APP_TRANSITION_REPORTED_DRAWN event: The activity was started with restoring from
    // a bundle.
    // a bundle.
    TYPE_TRANSITION_REPORTED_DRAWN_WITH_BUNDLE = 13;
    TYPE_TRANSITION_REPORTED_DRAWN_WITH_BUNDLE = 13;

    // The view switched to summary mode (most relevant for notifications)
    TYPE_COLLAPSE = 14;
  }
  }


  // Types of alerts, as bit field values
  // Types of alerts, as bit field values
+3 −2
Original line number Original line Diff line number Diff line
@@ -755,10 +755,11 @@ public class NotificationManagerService extends SystemService {
                if (r != null) {
                if (r != null) {
                    r.stats.onExpansionChanged(userAction, expanded);
                    r.stats.onExpansionChanged(userAction, expanded);
                    final long now = System.currentTimeMillis();
                    final long now = System.currentTimeMillis();
                    if (userAction && expanded) {
                    if (userAction) {
                        MetricsLogger.action(r.getLogMaker(now)
                        MetricsLogger.action(r.getLogMaker(now)
                                .setCategory(MetricsEvent.NOTIFICATION_ITEM)
                                .setCategory(MetricsEvent.NOTIFICATION_ITEM)
                                .setType(MetricsEvent.TYPE_DETAIL));
                                .setType(expanded ? MetricsEvent.TYPE_DETAIL
                                        : MetricsEvent.TYPE_COLLAPSE));
                    }
                    }
                    EventLogTags.writeNotificationExpansion(key,
                    EventLogTags.writeNotificationExpansion(key,
                            userAction ? 1 : 0, expanded ? 1 : 0,
                            userAction ? 1 : 0, expanded ? 1 : 0,