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

Commit 21ff4018 authored by Yuri Lin's avatar Yuri Lin
Browse files

Detect dismissals on the lockscreen surface

When users dismiss notifications from the lockscreen, they're currently getting attributed to being dismissed from the shade. This change distinguishes lockscreen dismissals from shade dismissals for more specific and accurate metrics.

(These dismissal surfaces are already translated to cancellation reasons in NotificationRecordLogger.)

Bug: 234507856
Test: statsd_testdrive
Change-Id: I80539025e2d4d7bacbcda59133a85d06d4690a35
parent 6303141f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.systemui.statusbar.notification.collection.inflation;

import static android.service.notification.NotificationStats.DISMISS_SENTIMENT_NEUTRAL;

import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;

import android.os.SystemClock;
import android.service.notification.NotificationStats;

@@ -70,6 +72,8 @@ public class OnUserInteractionCallbackImpl implements OnUserInteractionCallback
            dismissalSurface = NotificationStats.DISMISSAL_PEEK;
        } else if (mStatusBarStateController.isDozing()) {
            dismissalSurface = NotificationStats.DISMISSAL_AOD;
        } else if (mStatusBarStateController.getState() == KEYGUARD) {
            dismissalSurface = NotificationStats.DISMISSAL_LOCKSCREEN;
        }
        return new DismissedByUserStats(
                dismissalSurface,