diff options
author | Makoto Onuki <omakoto@google.com> | 2017-03-02 15:33:17 -0800 |
---|---|---|
committer | Makoto Onuki <omakoto@google.com> | 2017-03-02 16:58:14 -0800 |
commit | 3e7d845161870f6289aeecdf4bfd762097f487d6 (patch) | |
tree | e897cfea12da21896b96ac2fb186791a9cc3551e /docs/html/sdk/api_diff/24/changes | |
parent | d1c7bb771c76bbd24d070821b0734be9a68c3daa (diff) |
Make sure to call the original reply-to receiver when...
replacing a queued broadcast.
- Also don't replace a broadcast for a different user.
Test: Manual test with the following test code:
Intent intent = new Intent(Intent.ACTION_PROVIDER_CHANGED)
.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
AlarmManager alm = this.getSystemService(AlarmManager.class);
long time = SystemClock.elapsedRealtime() + 5 * 1000;
for (int i = 0; i < 5; i++) {
alm.setExact(AlarmManager.ELAPSED_REALTIME, time,
PendingIntent.getBroadcast(this, i, intent, PendingIntent.FLAG_UPDATE_CURRENT));
}
Without this CL, after the alarm fires, AlarmManagerService.mBroadcastRefCount
is left > 0 and the wake lock is held forever.
With this CL, mBroadcastRefCount eventually gets back to 0.
Bug: 35779096
Change-Id: I4e21c94b08f25f9ca1242182670ff4a69f8bd9f2
Diffstat (limited to 'docs/html/sdk/api_diff/24/changes')
0 files changed, 0 insertions, 0 deletions