ea1b82d2ab660a15659258da19fabe19e5d4fbd5 |
|
16-Jul-2015 |
Tony Mak <tonymak@google.com> |
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
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
98e01573880a2f1b1547d1e2e9a1c5c7d5e09043 |
|
12-Nov-2013 |
Alon Albert <aalbert@google.com> |
Initialize WakeLock in the CTOR Protect against possible race Also added a log that will indicate if a second provider is created in the in same process. Bug: 11260491 Change-Id: I3048d3c57d1cf6a13b808b85151d20ddb85d95a9
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
a55c3aaa2b13b5350918efda98906afb8b6206c1 |
|
31-Oct-2013 |
Alon Albert <aalbert@google.com> |
Don't trigger a sync for ALERTS tables Bug: 11350900 Change-Id: Iede3da60cb45ac496bea90c85d06eac36af617e1
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
1d557af66e0ba44eae39a7bf3878cf256fd8f136 |
|
26-Oct-2011 |
Andy McFadden <fadden@android.com> |
Move scheduled alarm scrub off main thread We currently do a database update when the "boot completed" intent is received. Doing it on the main thread appears to be causing ANRs, so this moves it to a background thread. An "empty" service is used to discourage the system from killing the provider while this is in progress. Also, removed an unused field from CalendarAlarmManager. Bug 5262151 Change-Id: I8e5b1bd7782500e1827f43d7a453f824a1e7944c
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
420b7fb569773ae573fbe90c3a9c522d4c368863 |
|
23-Mar-2011 |
Erik <epastern@google.com> |
Refactor CP2 to move alarm code into CalendarAlarmManager Change-Id: I07d8d028115ce21047afe9aeecb3bf9cc5f170be
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
656f9cb431c798c972260f31a4ebcd56047dff21 |
|
04-Nov-2010 |
Fabrice Di Meglio <fdimeglio@google.com> |
Simplify CalendarAlarmManager code and unit tests - implement only the needed delegations to AlarmService - MockCalendarAlarmManager is mocking all the CalendarAlarmManager methods Change-Id: I6f97a9a133a2336a791beb9b25874cbbb05ac857
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
e7a04f1fe637bc1322a6b4942e0251e3831cd544 |
|
03-Nov-2010 |
Fabrice Di Meglio <fdimeglio@google.com> |
Code refactoring for fixing unit tests and making CalendarProvider2 more testable - refactoring for mocking the use of the Wake locks - refactoring for mocking the use of the AlarmManager (introduce the CalendarAlarmManager) - fix the unit tests - fix bug 3122402 Change-Id: I5914ccf886612de260bc3c60fa192aad6c9887d2
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
c3fb804639a62353b76ea45fded1022650c2a73a |
|
22-Oct-2010 |
Fabrice Di Meglio <fdimeglio@google.com> |
Fix broken unit tests: - improve test data generation and cleaning - make the broken unit tests more close to reality (with better data sets) Change-Id: Iff97951c026b26e1c7581e2834e9a135e0ee48b0
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
315d9326acd39566959f3c547225483f1fb6aefc |
|
11-Sep-2010 |
Fabrice Di Meglio <fdimeglio@google.com> |
Manually merge "Add home timezone support" from Gingerbread: - add querying CalendarCache key/values thru CalendarProvider - add unit tests Change-Id: I21bf5935789c663ba01409142df734007c5a3a4e
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
6636020e221f0040d2d78ea03e7b3d9223256ff3 |
|
23-Mar-2010 |
Ken Shirriff <kens@google.com> |
Fix flaky testAttendees test. The onAccountsUpdated() method would asynchronously delete events, causing random test failures. This change overrides that method. This change also adds an assert so failures will be cleanly reported, rather than causing stack traces. bug 2395696 Change-Id: Idf36d96f83174bd8da216883a6371c24dcfe2ca1
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|
9f005e4843925efe4fa8434361c4ad4ad384ed4c |
|
27-Oct-2009 |
Ken Shirriff <kens@google.com> |
Add new CalendarProvider2 for new sync framework. This provider operates directly, rather than through a TempProviderSyncAdapter.
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/CalendarProvider2ForTesting.java
|