diff options
author | Adam Cohen <adamcohen@google.com> | 2014-02-21 14:09:53 -0800 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2014-02-21 14:37:53 -0800 |
commit | 71e03b9979b5ee4c30daa7eb0a704ec92b38431b (patch) | |
tree | b1e77f84fa954cc3903532bbd4fd52738dd99f03 /src/com/android/launcher3/LauncherProvider.java | |
parent | 36c123ec6b74be058702a37e8a01702b505da5c1 (diff) | |
download | android_packages_apps_Trebuchet-71e03b9979b5ee4c30daa7eb0a704ec92b38431b.tar.gz android_packages_apps_Trebuchet-71e03b9979b5ee4c30daa7eb0a704ec92b38431b.tar.bz2 android_packages_apps_Trebuchet-71e03b9979b5ee4c30daa7eb0a704ec92b38431b.zip |
Fix issue where clings didn't appear after set up wizard (issue 13077829)
-> Also removed the db-created as a criteria for showing the clings
(this was a bit problematic in some cases and going forward)
-> Instead, we use database upgrade as a signal to not show the clings.
This is used instead of the above criteria (to prevent old users from
seeing the migration cling and losing their data.)
-> Stripped some old code related to custom clings that's no longer used.
Change-Id: Ib5e5285e5ddbc60e69eb998ee9fd092ae879150d
Diffstat (limited to 'src/com/android/launcher3/LauncherProvider.java')
-rw-r--r-- | src/com/android/launcher3/LauncherProvider.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java index a69f4235d..b952729bd 100644 --- a/src/com/android/launcher3/LauncherProvider.java +++ b/src/com/android/launcher3/LauncherProvider.java @@ -71,7 +71,7 @@ public class LauncherProvider extends ContentProvider { private static final String DATABASE_NAME = "launcher.db"; - private static final int DATABASE_VERSION = 16; + private static final int DATABASE_VERSION = 17; static final String OLD_AUTHORITY = "com.android.launcher2.settings"; static final String AUTHORITY = ProviderConfig.AUTHORITY; @@ -769,6 +769,16 @@ public class LauncherProvider extends ContentProvider { } } + if (version < 17) { + // We use the db version upgrade here to identify users who may not have seen + // clings yet (because they weren't available), but for whom the clings are now + // available (tablet users). Because one of the possible cling flows (migration) + // is very destructive (wipes out workspaces), we want to prevent this from showing + // until clear data. We do so by marking that the clings have been shown. + LauncherClings.synchonouslyMarkFirstRunClingDismissed(mContext); + version = 17; + } + if (version != DATABASE_VERSION) { Log.w(TAG, "Destroying all old data."); db.execSQL("DROP TABLE IF EXISTS " + TABLE_FAVORITES); |