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

Commit 91d30b76 authored by Dan Sandler's avatar Dan Sandler Committed by Android Git Automerger
Browse files

am f0b8dacf: Disable importing workspaces from Launcher2.

* commit 'f0b8dacf':
  Disable importing workspaces from Launcher2.
parents 97436804 f0b8dacf
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) {