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

Commit 67502cd6 authored by Esteban Talavera's avatar Esteban Talavera Committed by Android (Google) Code Review
Browse files

Merge "Expand notification generates USER_INTERACTION event"

parents 54558ac6 917a71d4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -870,6 +870,7 @@ public class NotificationManagerService extends SystemService {
                    }
                    if (expanded && userAction) {
                        r.recordExpanded();
                        reportUserInteraction(r);
                    }
                    EventLogTags.writeNotificationExpansion(key,
                            userAction ? 1 : 0, expanded ? 1 : 0,
@@ -1987,7 +1988,7 @@ public class NotificationManagerService extends SystemService {
    }

    /**
     * Report to usage stats that the notification was clicked.
     * Report to usage stats that the user interacted with the notification.
     * @param r notification record
     */
    protected void reportUserInteraction(NotificationRecord r) {
+5 −1
Original line number Diff line number Diff line
@@ -915,8 +915,12 @@ class UserUsageStatsService {
                return "SCREEN_INTERACTIVE";
            case UsageEvents.Event.SCREEN_NON_INTERACTIVE:
                return "SCREEN_NON_INTERACTIVE";
            case UsageEvents.Event.KEYGUARD_SHOWN:
                return "KEYGUARD_SHOWN";
            case UsageEvents.Event.KEYGUARD_HIDDEN:
                return "KEYGUARD_HIDDEN";
            default:
                return "UNKNOWN";
                return "UNKNOWN_TYPE_" + eventType;
        }
    }