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

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

Merge "Make tracking notification ttls more performant" into main

parents 1e320e60 7983f2b7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -581,6 +581,7 @@

    <protected-broadcast android:name="android.app.action.KEYGUARD_PRIVATE_NOTIFICATIONS_CHANGED" />
    <protected-broadcast android:name="NotificationManagerService.TIMEOUT" />
    <protected-broadcast android:name="com.android.server.notification.TimeToLiveHelper" />
    <protected-broadcast android:name="NotificationHistoryDatabase.CLEANUP" />
    <protected-broadcast android:name="ScheduleConditionProvider.EVALUATE" />
    <protected-broadcast android:name="EventConditionProvider.EVALUATE" />
+2 −0
Original line number Diff line number Diff line
@@ -25,4 +25,6 @@ import android.annotation.Nullable;
interface NotificationManagerPrivate {
    @Nullable
    NotificationRecord getNotificationByKey(String key);

    void timeoutNotification(String key);
}
+208 −114

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ import dalvik.annotation.optimization.NeverCompile;

import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -600,8 +601,7 @@ public final class NotificationRecord {
        pw.println(prefix + "headsUpContentView="
                + formatRemoteViews(notification.headsUpContentView));
        pw.println(prefix + String.format("color=0x%08x", notification.color));
        pw.println(prefix + "timeout="
                + TimeUtils.formatForLogging(notification.getTimeoutAfter()));
        pw.println(prefix + "timeout=" + Duration.ofMillis(notification.getTimeoutAfter()));
        if (notification.actions != null && notification.actions.length > 0) {
            pw.println(prefix + "actions={");
            final int N = notification.actions.length;
+7 −0
Original line number Diff line number Diff line
@@ -287,4 +287,11 @@ public class ShortcutHelper {
            }
        }
    }

    void destroy() {
        if (mLauncherAppsCallbackRegistered) {
            mLauncherAppsService.unregisterCallback(mLauncherAppsCallback);
            mLauncherAppsCallbackRegistered = false;
        }
    }
}
Loading