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

Commit a87e9bc0 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Only noisy notifications can be bumped for intrusiveness." into nyc-dev

parents 139bc621 0dbb7310
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import android.util.Log;
import android.util.Slog;

/**
 * This {@link com.android.server.notification.NotificationSignalExtractor} noticies noisy
 * This {@link com.android.server.notification.NotificationSignalExtractor} notices noisy
 * notifications and marks them to get a temporary ranking bump.
 */
public class NotificationIntrusivenessExtractor implements NotificationSignalExtractor {
@@ -44,10 +44,16 @@ public class NotificationIntrusivenessExtractor implements NotificationSignalExt
            return null;
        }

        if (record.getImportance() >= NotificationListenerService.Ranking.IMPORTANCE_DEFAULT) {
            final Notification notification = record.getNotification();
        if (record.getImportance() > NotificationListenerService.Ranking.IMPORTANCE_DEFAULT) {
            if ((notification.defaults & Notification.DEFAULT_VIBRATE) != 0 ||
                    notification.vibrate != null ||
                    (notification.defaults & Notification.DEFAULT_SOUND) != 0 ||
                    notification.sound != null ||
                    notification.fullScreenIntent != null) {
                record.setRecentlyIntrusive(true);
            }
        }

        return new RankingReconsideration(record.getKey(), HANG_TIME_MS) {
            @Override