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
diff --git a/src/com/android/calendar/AllInOneActivity.java b/src/com/android/calendar/AllInOneActivity.java
index e61d69c..0e1feb4 100644
--- a/src/com/android/calendar/AllInOneActivity.java
+++ b/src/com/android/calendar/AllInOneActivity.java
@@ -507,6 +507,9 @@
     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.