Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b63830a7 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Stop using IntentService and use async receiver (2/2 - contract)

Also:
- Set FLAG_RECEIVER_INCLUDE_BACKGROUND for ACTION_EVENT_REMINDER
- Remove the wake lock; with goAsync() now it's not needed.

Test: Manual test with: adb shell am broadcast --receiver-include-background -a android.intent.action.EVENT_REMINDER -d content:
Bug 35207106

Change-Id: I9e456f473f13b71df6e0dd1a1abdb0df8c26e6c7
parent b09ac24c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2392,6 +2392,7 @@ public final class CalendarContract {
            Intent intent = new Intent(ACTION_EVENT_REMINDER);
            intent.setData(ContentUris.withAppendedId(CalendarContract.CONTENT_URI, alarmTime));
            intent.putExtra(ALARM_TIME, alarmTime);
            intent.setFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
            PendingIntent pi = PendingIntent.getBroadcast(context, 0, intent, 0);
            manager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, alarmTime, pi);
        }