Merge "Stop crashing the system on hitting the alarm limit" into rvc-dev

This commit is contained in:
Suprabh Shukla
2022-07-22 04:35:18 +00:00
committed by Android (Google) Code Review

View File

@@ -75,6 +75,7 @@ import android.text.format.DateFormat;
import android.text.format.DateUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.EventLog;
import android.util.KeyValueListParser;
import android.util.Log;
import android.util.LongArrayQueue;
@@ -1776,7 +1777,11 @@ class AlarmManagerService extends SystemService {
if (DEBUG_PER_UID_LIMIT && UserHandle.isCore(callingUid)) {
logAllAlarmsForUidLocked(callingUid);
}
throw new IllegalStateException(errorMsg);
if (callingUid != Process.SYSTEM_UID) {
throw new IllegalStateException(errorMsg);
} else {
EventLog.writeEvent(0x534e4554, "234441463", -1, errorMsg);
}
}
setImplLocked(type, triggerAtTime, triggerElapsed, windowLength, maxElapsed,
interval, operation, directReceiver, listenerTag, flags, true, workSource,