summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-12-03 01:17:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-12-03 01:17:38 +0000
commitc924cacfab4144eefdf8e46dfc82d79cb15e9c96 (patch)
treee83030f3005d44e7314ea2cba2ce41fab9e98ea8
parent1c00fd0b045179c9e6cc2dfc344cddc1a8d5b383 (diff)
parent6dbe049431741a9dfa05f7eee144335e9da76281 (diff)
downloadandroid_packages_apps_Trebuchet-c924cacfab4144eefdf8e46dfc82d79cb15e9c96.zip
android_packages_apps_Trebuchet-c924cacfab4144eefdf8e46dfc82d79cb15e9c96.tar.gz
android_packages_apps_Trebuchet-c924cacfab4144eefdf8e46dfc82d79cb15e9c96.tar.bz2
Merge "Only import workspaces for non-tablets (where grid hasn't changed)" into jb-ub-now-jolly-elf
-rw-r--r--src/com/android/launcher3/LauncherProvider.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherProvider.java b/src/com/android/launcher3/LauncherProvider.java
index 4eb30e7..54de635 100644
--- a/src/com/android/launcher3/LauncherProvider.java
+++ b/src/com/android/launcher3/LauncherProvider.java
@@ -290,6 +290,13 @@ public class LauncherProvider extends ContentProvider {
public void onRow(ContentValues values);
}
+ private static boolean shouldImportLauncher2Database(Context context) {
+ boolean isTablet = context.getResources().getBoolean(R.bool.is_tablet);
+
+ // We don't import the old databse for tablets, as the grid size has changed.
+ return !isTablet && IMPORT_LAUNCHER2_DATABASE;
+ }
+
private static class DatabaseHelper extends SQLiteOpenHelper {
private static final String TAG_FAVORITES = "favorites";
private static final String TAG_FAVORITE = "favorite";
@@ -369,7 +376,7 @@ public class LauncherProvider extends ContentProvider {
sendAppWidgetResetNotify();
}
- if (IMPORT_LAUNCHER2_DATABASE) {
+ if (shouldImportLauncher2Database(mContext)) {
// Try converting the old database
ContentValuesCallback permuteScreensCb = new ContentValuesCallback() {
public void onRow(ContentValues values) {