summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-11 19:10:34 (GMT)
committerSunny Goyal <sunnygoyal@google.com>2015-08-11 19:10:34 (GMT)
commit6579e1eee8a6fce44f020d40c3bbdbf245d6c12c (patch)
treea712d7425cfb1fe888a990276512f2cbe1378f6b
parenta1ee659e748b02ed74d8cafd3796a5c8ce5f1c44 (diff)
downloadandroid_packages_apps_Trebuchet-6579e1eee8a6fce44f020d40c3bbdbf245d6c12c.zip
android_packages_apps_Trebuchet-6579e1eee8a6fce44f020d40c3bbdbf245d6c12c.tar.gz
android_packages_apps_Trebuchet-6579e1eee8a6fce44f020d40c3bbdbf245d6c12c.tar.bz2
Disabling home screen migration logic
Change-Id: I506948852945bfb8ebd7a95fc951880ffe9a3e17
-rw-r--r--src/com/android/launcher3/LauncherBackupAgentHelper.java2
-rw-r--r--src/com/android/launcher3/LauncherBackupHelper.java4
-rw-r--r--src/com/android/launcher3/LauncherModel.java3
-rw-r--r--src/com/android/launcher3/model/MigrateFromRestoreTask.java2
4 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/launcher3/LauncherBackupAgentHelper.java b/src/com/android/launcher3/LauncherBackupAgentHelper.java
index 611ab2e..3debef6 100644
--- a/src/com/android/launcher3/LauncherBackupAgentHelper.java
+++ b/src/com/android/launcher3/LauncherBackupAgentHelper.java
@@ -98,7 +98,7 @@ public class LauncherBackupAgentHelper extends BackupAgentHelper {
LauncherAppState.getLauncherProvider().updateFolderItemsRank();
}
- if (mHelper.shouldAttemptWorkspaceMigration()) {
+ if (MigrateFromRestoreTask.ENABLED && mHelper.shouldAttemptWorkspaceMigration()) {
MigrateFromRestoreTask.markForMigration(getApplicationContext(),
(int) mHelper.migrationCompatibleProfileData.desktopCols,
(int) mHelper.migrationCompatibleProfileData.desktopRows,
diff --git a/src/com/android/launcher3/LauncherBackupHelper.java b/src/com/android/launcher3/LauncherBackupHelper.java
index 136556b..2d11d3a 100644
--- a/src/com/android/launcher3/LauncherBackupHelper.java
+++ b/src/com/android/launcher3/LauncherBackupHelper.java
@@ -52,6 +52,7 @@ import com.android.launcher3.backup.BackupProtos.Screen;
import com.android.launcher3.backup.BackupProtos.Widget;
import com.android.launcher3.compat.UserHandleCompat;
import com.android.launcher3.compat.UserManagerCompat;
+import com.android.launcher3.model.MigrateFromRestoreTask;
import com.android.launcher3.util.Thunk;
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
import com.google.protobuf.nano.MessageNano;
@@ -314,7 +315,8 @@ public class LauncherBackupHelper implements BackupHelper {
return true;
}
- if ((oldProfile.desktopCols - currentProfile.desktopCols <= 1) &&
+ if (MigrateFromRestoreTask.ENABLED &&
+ (oldProfile.desktopCols - currentProfile.desktopCols <= 1) &&
(oldProfile.desktopRows - currentProfile.desktopRows <= 1)) {
// Allow desktop migration when row and/or column count contracts by 1.
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index f029561..d9b0cd4 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -1758,8 +1758,7 @@ public class LauncherModel extends BroadcastReceiver
int countX = (int) profile.numColumns;
int countY = (int) profile.numRows;
-
- if (MigrateFromRestoreTask.shouldRunTask(mContext)) {
+ if (MigrateFromRestoreTask.ENABLED && MigrateFromRestoreTask.shouldRunTask(mContext)) {
long migrationStartTime = System.currentTimeMillis();
Log.v(TAG, "Starting workspace migration after restore");
try {
diff --git a/src/com/android/launcher3/model/MigrateFromRestoreTask.java b/src/com/android/launcher3/model/MigrateFromRestoreTask.java
index 8d4472f..6a529f6 100644
--- a/src/com/android/launcher3/model/MigrateFromRestoreTask.java
+++ b/src/com/android/launcher3/model/MigrateFromRestoreTask.java
@@ -37,6 +37,8 @@ import java.util.HashSet;
*/
public class MigrateFromRestoreTask {
+ public static boolean ENABLED = false;
+
private static final String TAG = "MigrateFromRestoreTask";
private static final boolean DEBUG = true;