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

Commit f0b8dacf authored by Dan Sandler's avatar Dan Sandler
Browse files

Disable importing workspaces from Launcher2.

Bug: 9832552
Bug: 11761032
Change-Id: I4dfd16046e9d6d0d1d864dff4340b0ed13cc8b8f
parent 540efef7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1636,7 +1636,9 @@ public class LauncherModel extends BroadcastReceiver {
            LauncherAppState.getLauncherProvider().loadDefaultFavoritesIfNecessary(0);

            // Check if we need to do any upgrade-path logic
            // (Includes having just imported default favorites)
            boolean loadedOldDb = LauncherAppState.getLauncherProvider().justLoadedOldDb();

            // Log to disk
            Launcher.addDumpLog(TAG, "11683562 -   loadedOldDb: " + loadedOldDb, true);

+32 −23
Original line number Diff line number Diff line
@@ -71,6 +71,9 @@ public class LauncherProvider extends ContentProvider {
    static final String OLD_AUTHORITY = "com.android.launcher2.settings";
    static final String AUTHORITY = ProviderConfig.AUTHORITY;

    // Should we attempt to load anything from the com.android.launcher2 provider?
    static final boolean IMPORT_LAUNCHER2_DATABASE = false;

    static final String TABLE_FAVORITES = "favorites";
    static final String TABLE_WORKSPACE_SCREENS = "workspaceScreens";
    static final String PARAMETER_NOTIFY = "notify";
@@ -366,6 +369,7 @@ public class LauncherProvider extends ContentProvider {
                sendAppWidgetResetNotify();
            }

            if (IMPORT_LAUNCHER2_DATABASE) {
                // Try converting the old database
                ContentValuesCallback permuteScreensCb = new ContentValuesCallback() {
                    public void onRow(ContentValues values) {
@@ -392,6 +396,11 @@ public class LauncherProvider extends ContentProvider {
                // upgrade code (ie. to fix workspace screen indices -> ids, etc.), so
                // set that flag too.
                setFlagJustLoadedOldDb();
            } else {
                // Fresh and clean launcher DB.
                mMaxItemId = initializeMaxItemId(db);
                setFlagEmptyDbCreated();
            }
        }

        private void addWorkspacesTable(SQLiteDatabase db) {