Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c924cacf authored by Adam Cohen's avatar Adam Cohen Committed by Android (Google) Code Review
Browse files

Merge "Only import workspaces for non-tablets (where grid hasn't changed)" into jb-ub-now-jolly-elf

parents 1c00fd0b 6dbe0494
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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) {