diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-06-10 12:22:04 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-06-15 10:03:12 -0700 |
commit | a9e2f5abb3c21d9721939c625ffb0caabb34e8d9 (patch) | |
tree | d9ac34c73a79fd9d59b782ba42b96f84edd9882a /src/com/android/launcher3/LauncherProvider.java | |
parent | b25b2c41c2fa277e16d708ad827e283efcb86452 (diff) | |
download | android_packages_apps_Trebuchet-a9e2f5abb3c21d9721939c625ffb0caabb34e8d9.tar.gz android_packages_apps_Trebuchet-a9e2f5abb3c21d9721939c625ffb0caabb34e8d9.tar.bz2 android_packages_apps_Trebuchet-a9e2f5abb3c21d9721939c625ffb0caabb34e8d9.zip |
Adding a DB update path to handle the QSB position change
> Renamed the id of 1st screen to 0 and making space for the QSB
by running the grid migration task.
> Added a feature flag to easily disable the QSB-in-workspace behavior
Change-Id: Ie3369f0d4433d916e9d6215d414770d4333f3e26
Diffstat (limited to 'src/com/android/launcher3/LauncherProvider.java')
-rw-r--r-- | src/com/android/launcher3/LauncherProvider.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java index dfb8ba277..4e7d57bb2 100644 --- a/src/com/android/launcher3/LauncherProvider.java +++ b/src/com/android/launcher3/LauncherProvider.java @@ -23,7 +23,6 @@ import android.content.ComponentName; import android.content.ContentProvider; import android.content.ContentProviderOperation; import android.content.ContentProviderResult; -import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; @@ -48,15 +47,16 @@ import android.os.Process; import android.os.UserManager; import android.text.TextUtils; import android.util.Log; -import android.util.SparseArray; import com.android.launcher3.AutoInstallsLayout.LayoutParserCallback; import com.android.launcher3.LauncherSettings.Favorites; import com.android.launcher3.LauncherSettings.WorkspaceScreens; import com.android.launcher3.compat.UserHandleCompat; import com.android.launcher3.compat.UserManagerCompat; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.config.ProviderConfig; import com.android.launcher3.dynamicui.ExtractionUtils; +import com.android.launcher3.provider.LauncherDbUtils; import com.android.launcher3.provider.RestoreDbTask; import com.android.launcher3.util.ManagedProfileHeuristic; import com.android.launcher3.util.NoLocaleSqliteContext; @@ -66,13 +66,12 @@ import com.android.launcher3.util.Thunk; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; -import java.util.HashSet; public class LauncherProvider extends ContentProvider { private static final String TAG = "LauncherProvider"; private static final boolean LOGD = false; - private static final int DATABASE_VERSION = 26; + private static final int DATABASE_VERSION = 27; public static final String AUTHORITY = ProviderConfig.AUTHORITY; @@ -780,7 +779,13 @@ public class LauncherProvider extends ContentProvider { ManagedProfileHeuristic.markExistingUsersForNoFolderCreation(mContext); case 25: convertShortcutsToLauncherActivities(db); - case 26: { + case 26: + // QSB was moved to the grid. Clear the first row on screen 0. + if (FeatureFlags.QSB_ON_FIRST_SCREEN && + !LauncherDbUtils.prepareScreenZeroToHostQsb(db)) { + break; + } + case 27: { // DB Upgraded successfully return; } |