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

This commit is contained in:
Makoto Onuki
2017-02-10 16:27:49 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}