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

Commit cca31ca5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update TIME_TICK removal warning" into main

parents fe41818b 6434dd18
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ public class AlarmManagerService extends SystemService {
     */
    int mSystemUiUid;

    static boolean isTimeTickAlarm(Alarm a) {
    private static boolean isTimeTickAlarm(Alarm a) {
        return a.uid == Process.SYSTEM_UID && TIME_TICK_TAG.equals(a.listenerTag);
    }

@@ -3955,6 +3955,9 @@ public class AlarmManagerService extends SystemService {
            if (!RemovedAlarm.isLoggable(reason)) {
                continue;
            }
            if (isTimeTickAlarm(removed)) {
                Slog.wtf(TAG, "Removed TIME_TICK alarm");
            }
            RingBuffer<RemovedAlarm> bufferForUid = mRemovalHistory.get(removed.uid);
            if (bufferForUid == null) {
                bufferForUid = new RingBuffer<>(RemovedAlarm.class, REMOVAL_HISTORY_SIZE_PER_UID);
+0 −7
Original line number Diff line number Diff line
@@ -17,11 +17,9 @@
package com.android.server.alarm;

import static com.android.server.alarm.AlarmManagerService.dumpAlarmList;
import static com.android.server.alarm.AlarmManagerService.isTimeTickAlarm;

import android.app.AlarmManager;
import android.util.IndentingPrintWriter;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;

import com.android.internal.annotations.VisibleForTesting;
@@ -88,11 +86,6 @@ public class LazyAlarmStore implements AlarmStore {
                if (removed.alarmClock != null && mOnAlarmClockRemoved != null) {
                    mOnAlarmClockRemoved.run();
                }
                if (isTimeTickAlarm(removed)) {
                    // This code path is not invoked when delivering alarms, only when removing
                    // alarms due to the caller cancelling it or getting uninstalled, etc.
                    Slog.wtf(TAG, "Removed TIME_TICK alarm");
                }
                removedAlarms.add(removed);
            }
        }