summaryrefslogtreecommitdiffstats
path: root/src/com/android/calendar/AllInOneActivity.java
diff options
context:
space:
mode:
authorSam Blitzstein <sblitz@google.com>2013-12-04 12:59:36 -0800
committerSam Blitzstein <sblitz@google.com>2013-12-04 13:02:35 -0800
commitf52c64145b6219aeceeb93f4bdb5e2c069bf48a4 (patch)
tree9740c9390710c179fbea75306814d2661ae19d7c /src/com/android/calendar/AllInOneActivity.java
parentfb0097adc5656ccd052abb9e6e807355768d200a (diff)
downloadandroid_packages_apps_Calendar-f52c64145b6219aeceeb93f4bdb5e2c069bf48a4.tar.gz
android_packages_apps_Calendar-f52c64145b6219aeceeb93f4bdb5e2c069bf48a4.tar.bz2
android_packages_apps_Calendar-f52c64145b6219aeceeb93f4bdb5e2c069bf48a4.zip
Force a manual, incremental sync one time, as early as possible.
Either at package replacement (doesn't seem to work), restart, or app load. Only do this one time. This is to ensure the database goes through the proper upgrade path in case its in a bad state. Bug: 11828610 Change-Id: I850bef5d105fcb806f74b3fdffba1dfef03a0a1b
Diffstat (limited to 'src/com/android/calendar/AllInOneActivity.java')
-rw-r--r--src/com/android/calendar/AllInOneActivity.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/calendar/AllInOneActivity.java b/src/com/android/calendar/AllInOneActivity.java
index e61d69c8..0e1feb49 100644
--- a/src/com/android/calendar/AllInOneActivity.java
+++ b/src/com/android/calendar/AllInOneActivity.java
@@ -507,6 +507,9 @@ public class AllInOneActivity extends AbstractCalendarActivity implements EventH
protected void onResume() {
super.onResume();
+ // Check if the upgrade code has ever been run. If not, force a sync just this one time.
+ Utils.trySyncAndDisableUpgradeReceiver(this);
+
// Must register as the first activity because this activity can modify
// the list of event handlers in it's handle method. This affects who
// the rest of the handlers the controller dispatches to are.