diff options
author | Romain Guy <romainguy@android.com> | 2010-03-23 15:10:56 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2010-03-23 15:10:56 -0700 |
commit | 509cd6a656627187dae20fdbec2bad76dfe7fab6 (patch) | |
tree | f3fb42f155f750c454aedd92bffec51f7e2f4d6f /src/com/android/launcher2/LauncherProvider.java | |
parent | 9690b396d5f24a31ce8ffd9739f1f5d03a69bdce (diff) | |
download | packages_apps_trebuchet-509cd6a656627187dae20fdbec2bad76dfe7fab6.zip packages_apps_trebuchet-509cd6a656627187dae20fdbec2bad76dfe7fab6.tar.gz packages_apps_trebuchet-509cd6a656627187dae20fdbec2bad76dfe7fab6.tar.bz2 |
Correctly upgrade from MR3 to FroYo.
Bug #2530137
Change-Id: I9ab59fd53e17a1f51f60a8cb98dcb19a7957ffc6
Diffstat (limited to 'src/com/android/launcher2/LauncherProvider.java')
-rw-r--r-- | src/com/android/launcher2/LauncherProvider.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/launcher2/LauncherProvider.java b/src/com/android/launcher2/LauncherProvider.java index d50b19c..a02e449 100644 --- a/src/com/android/launcher2/LauncherProvider.java +++ b/src/com/android/launcher2/LauncherProvider.java @@ -366,22 +366,28 @@ public class LauncherProvider extends ContentProvider { version = 4; } - if (version < 5) { + // Where's version 5? + // - Donut and sholes on 2.0 shipped with version 4 of launcher1. + // - Passion shipped on 2.1 with version 6 of launcher2 + // - Sholes shipped on 2.1r1 (aka Mr. 3) with version 5 of launcher 1 + // but version 5 on there was the updateContactsShortcuts change + // which was version 6 in launcher 2 (first shipped on passion 2.1r1). + // The updateContactsShortcuts change is idempotent, so running it twice + // is okay so we'll do that when upgrading the devices that shipped with it. + if (version < 6) { // We went from 3 to 5 screens. Move everything 1 to the right db.beginTransaction(); try { db.execSQL("UPDATE favorites SET screen=(screen + 1);"); db.setTransactionSuccessful(); - version = 5; } catch (SQLException ex) { // Old version remains, which means we wipe old data Log.e(TAG, ex.getMessage(), ex); } finally { db.endTransaction(); } - } - if (version < 6) { + // We added the fast track. if (updateContactsShortcuts(db)) { version = 6; } |