Loading core/java/android/app/AlarmManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,14 @@ public class AlarmManager private void setImpl(int type, long triggerAtMillis, long windowMillis, long intervalMillis, PendingIntent operation) { if (triggerAtMillis < 0) { if (mAlwaysExact) { // Fatal error for KLP+ apps to use negative trigger times throw new IllegalArgumentException("Invalid alarm trigger time " + triggerAtMillis); } triggerAtMillis = 0; } try { mService.set(type, triggerAtMillis, windowMillis, intervalMillis, operation); } catch (RemoteException ex) { Loading services/java/com/android/server/AlarmManagerService.java +16 −2 Original line number Diff line number Diff line Loading @@ -521,6 +521,14 @@ class AlarmManagerService extends IAlarmManager.Stub { throw new IllegalArgumentException("Invalid alarm type " + type); } if (triggerAtTime < 0) { final long who = Binder.getCallingUid(); final long what = Binder.getCallingPid(); Slog.w(TAG, "Invalid alarm trigger time! " + triggerAtTime + " from uid=" + who + " pid=" + what); triggerAtTime = 0; } final long nowElapsed = SystemClock.elapsedRealtime(); final long triggerElapsed = convertToElapsed(triggerAtTime, type); final long maxElapsed; Loading Loading @@ -567,7 +575,12 @@ class AlarmManagerService extends IAlarmManager.Stub { } if (DEBUG_VALIDATE) { if (doValidate && validateConsistencyLocked()) { if (doValidate && !validateConsistencyLocked()) { Slog.v(TAG, "Tipping-point operation: type=" + type + " when=" + when + " when(hex)=" + Long.toHexString(when) + " whenElapsed=" + whenElapsed + " maxWhen=" + maxWhen + " interval=" + interval + " op=" + operation + " standalone=" + isStandalone); rebatchAllAlarmsLocked(false); reschedule = true; } Loading @@ -586,8 +599,9 @@ class AlarmManagerService extends IAlarmManager.Stub { final int NZ = mAlarmBatches.size(); for (int iz = 0; iz < NZ; iz++) { Batch bz = mAlarmBatches.get(iz); Slog.v(TAG, "Batch " + iz + ": " + bz); pw.append("Batch "); pw.print(iz); pw.append(": "); pw.println(bz); dumpAlarmList(pw, bz.alarms, " ", nowELAPSED, nowRTC); pw.flush(); Slog.v(TAG, bs.toString()); bs.reset(); } Loading Loading
core/java/android/app/AlarmManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,14 @@ public class AlarmManager private void setImpl(int type, long triggerAtMillis, long windowMillis, long intervalMillis, PendingIntent operation) { if (triggerAtMillis < 0) { if (mAlwaysExact) { // Fatal error for KLP+ apps to use negative trigger times throw new IllegalArgumentException("Invalid alarm trigger time " + triggerAtMillis); } triggerAtMillis = 0; } try { mService.set(type, triggerAtMillis, windowMillis, intervalMillis, operation); } catch (RemoteException ex) { Loading
services/java/com/android/server/AlarmManagerService.java +16 −2 Original line number Diff line number Diff line Loading @@ -521,6 +521,14 @@ class AlarmManagerService extends IAlarmManager.Stub { throw new IllegalArgumentException("Invalid alarm type " + type); } if (triggerAtTime < 0) { final long who = Binder.getCallingUid(); final long what = Binder.getCallingPid(); Slog.w(TAG, "Invalid alarm trigger time! " + triggerAtTime + " from uid=" + who + " pid=" + what); triggerAtTime = 0; } final long nowElapsed = SystemClock.elapsedRealtime(); final long triggerElapsed = convertToElapsed(triggerAtTime, type); final long maxElapsed; Loading Loading @@ -567,7 +575,12 @@ class AlarmManagerService extends IAlarmManager.Stub { } if (DEBUG_VALIDATE) { if (doValidate && validateConsistencyLocked()) { if (doValidate && !validateConsistencyLocked()) { Slog.v(TAG, "Tipping-point operation: type=" + type + " when=" + when + " when(hex)=" + Long.toHexString(when) + " whenElapsed=" + whenElapsed + " maxWhen=" + maxWhen + " interval=" + interval + " op=" + operation + " standalone=" + isStandalone); rebatchAllAlarmsLocked(false); reschedule = true; } Loading @@ -586,8 +599,9 @@ class AlarmManagerService extends IAlarmManager.Stub { final int NZ = mAlarmBatches.size(); for (int iz = 0; iz < NZ; iz++) { Batch bz = mAlarmBatches.get(iz); Slog.v(TAG, "Batch " + iz + ": " + bz); pw.append("Batch "); pw.print(iz); pw.append(": "); pw.println(bz); dumpAlarmList(pw, bz.alarms, " ", nowELAPSED, nowRTC); pw.flush(); Slog.v(TAG, bs.toString()); bs.reset(); } Loading