OSDN Git Service

Fix bad alarm delivery
authorChristopher Tate <ctate@google.com>
Tue, 16 Dec 2014 20:14:06 +0000 (12:14 -0800)
committerChristopher Tate <ctate@google.com>
Tue, 16 Dec 2014 20:54:49 +0000 (12:54 -0800)
commit0dab4dc03d1daae72bba9d364e15f6055cb339fd
tree42d7ef734e3433ca0e2ba596f4d77369efb8595e
parentec3f46a5ec961e7f41d1e0d40e97806e9767bfb3
Fix bad alarm delivery

The man bent over his hourglass,
A programmer of sorts. The day was green.

They said, "You have a blue hourglass,
You do not fire alarms when they're asked."

The man replied, "Alarms as they're asked
are changed within the blue hourglass."

And they said then, "But fire, you must
Alarms beyond us, yet themselves,

Alarms within the blue hourglass
That trigger exactly when they're asked."

 ---

Fix the delivery-fuzzing semantics that had been introduced in
81f9882b5aadd6a2289c9f521a06a7af5f35ebf0.  That patch turned out
to be incomplete; in particular, alarms scheduled later might require
the validity of an already-scheduled kernel alarm even if they did
not affect the head alarm batch directly, and this was not being
addressed.  For now, roll back the fuzzed delivery logic entirely.
(This is not a full revert because that patch also caused exact alarms
to be considered standalone for batching purposes, and we need to
preserve that new policy.)

Bug 18726690
Bug 18765436

This is a 'git revert' of 81f9882b5aadd6a2289c9f521a06a7af5f35ebf0
*except* that this CL preserves the "exact alarms are treated as
standalone" portion of the original patch.

(Cherrypick of 5c3e277fb42bd799287936c5aee0d30fbcc7e65c from its
original branch.)

Change-Id: Ib9c3200f7e6bc6fa0c9928ee9db4cfd87f039353
services/core/java/com/android/server/AlarmManagerService.java