summaryrefslogtreecommitdiffstats
path: root/AndroidManifest.xml
diff options
context:
space:
mode:
authorTony Mak <tonymak@google.com>2015-07-16 13:03:48 +0100
committerTony Mak <tonymak@google.com>2015-07-16 13:03:48 +0100
commitea1b82d2ab660a15659258da19fabe19e5d4fbd5 (patch)
treefbda57d62c47c268f31c2be9a92b1e042efc2b24 /AndroidManifest.xml
parent08007188ce3af03ed13e9252febc9b22e1bfe953 (diff)
downloadplatform_packages_providers_CalendarProvider-ea1b82d2ab660a15659258da19fabe19e5d4fbd5.tar.gz
platform_packages_providers_CalendarProvider-ea1b82d2ab660a15659258da19fabe19e5d4fbd5.tar.bz2
platform_packages_providers_CalendarProvider-ea1b82d2ab660a15659258da19fabe19e5d4fbd5.zip
Fix calendar reminder notification is not shown in idle state
M introduce "doze" which prevents alarm goes off when devices is in idle state. The solution is to use setExactAndAllowWhileIdle, however, there is a restriction that we can only have one such an alarm within 15 mins during dozing. Before explaining the changes, here is the brief introduction how reminder notification works. CalendarProvider send EVENT_REMINDER broadcast to notify calendar app to show notification. It sets two alarms, one to send this broadcast and set one another to schedule the next coming reminder. The scheduler alarm goes off one minute after the reminder alarm. Here are the changes: 1.Due to the 15 min restriction, the current architecture is not working. This commit removes the scheduler alarm. CalendarProvider now listens for the EVENT_REMINDER broadcast and schedule the next reminder immediately. 2. When there is no reminder within 1 day, CalendarProvider will setup an alarm on the next day to start the scheduler again. This alarm needs to goes off in idle state. But due to the 15 mins restriction, now the time is set to 15 mins earlier. 3. Also remove SCHEDULE broadcast which is basically same as the ACTION_CHECK_NEXT_ALARM broadcast. 4. ag/720759 make sure the reminder alarm goes off during dozing. Please notice that even with this commit, we can't have more than one reminder notification within 15 minutes due to the restriction mentioned above. Bug: 22182280 Change-Id: I950dab5595a98a26370f2cd8decf0b32d9363591
Diffstat (limited to 'AndroidManifest.xml')
-rw-r--r--AndroidManifest.xml9
1 files changed, 7 insertions, 2 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8c80116..0b95490 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -101,11 +101,16 @@
</intent-filter>
</receiver>
- <receiver android:name="CalendarProviderBroadcastReceiver">
+ <receiver android:name="CalendarProviderBroadcastReceiver"
+ android:exported="false">
<intent-filter>
- <action android:name="com.android.providers.calendar.intent.CalendarProvider2" />
+ <action android:name="com.android.providers.calendar.intent.CalendarProvider2"/>
<category android:name="com.android.providers.calendar"/>
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.EVENT_REMINDER"/>
+ <data android:scheme="content" />
+ </intent-filter>
</receiver>
<service android:name="CalendarProviderIntentService"/>