History log of /frameworks/base/tests/ActivityTests/src/com/google/android/test/activity/AlarmSpamReceiver.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3d1933c45fe9ba2389ebd166d96abeceab1971d1 11-Jun-2015 Dianne Hackborn <hackbod@google.com> Implement some control over ALLOW_WHILE_IDLE alarms.

Since these alarms allow you to bypass the idle restrictions,
we don't want them to be so open-ended like other alarms. This
implements a policy where the alarm manager will only deliver these
types of alarms every X minutes to each application. For this
initial implementation, X is 1 minute under normal operation and
15 minutes when in idle mode.

To do this, I needed to introduce a new internal allow-while-idle
flag for system alarms, which applications can't get, and doesn't
have these new restrictions.

Also tweaked how the alarm manager handles the alarm window, so it
doesn't change if the alarm gets rescheduld; the window is now always
what as computed based on the time when the alarm was first
given to it.

Finally, fix TimeUtils to be able to correctly print times that
are > 999 days.

Change-Id: Ibad8c6a7c14b0624b54e82267be23224b4c31e84
/frameworks/base/tests/ActivityTests/src/com/google/android/test/activity/AlarmSpamReceiver.java