Merge remote-tracking branch 'aosp/android12-release' into 12-dev
This commit is contained in:
commit
cc2bd15873
1227 files changed
+77789
-38760
No files matched your search
@@ -25,7 +25,6 @@ import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.LauncherSettings.Settings;
|
||||
@@ -40,6 +39,7 @@ import com.android.launcher3.provider.LauncherDbUtils.SQLiteTransaction;
|
||||
import com.android.launcher3.util.GridOccupancy;
|
||||
import com.android.launcher3.util.IntArray;
|
||||
import com.android.launcher3.util.IntSparseArrayMap;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.widget.WidgetManagerHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -55,7 +55,7 @@ import app.lawnchair.LawnchairApp;
|
||||
public class GridSizeMigrationTask {
|
||||
|
||||
private static final String TAG = "GridSizeMigrationTask";
|
||||
private static final boolean DEBUG = true;
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
// These are carefully selected weights for various item types (Math.random?), to allow for
|
||||
// the least absurd migration experience.
|
||||
@@ -895,7 +895,7 @@ public class GridSizeMigrationTask {
|
||||
String gridSizeString = getPointString(idp.numColumns, idp.numRows);
|
||||
|
||||
return !gridSizeString.equals(prefs.getString(KEY_MIGRATION_SRC_WORKSPACE_SIZE, ""))
|
||||
|| idp.numHotseatIcons != prefs.getInt(KEY_MIGRATION_SRC_HOTSEAT_COUNT, -1);
|
||||
|| idp.numDatabaseHotseatIcons != prefs.getInt(KEY_MIGRATION_SRC_HOTSEAT_COUNT, -1);
|
||||
}
|
||||
|
||||
/** See {@link #migrateGridIfNeeded(Context, InvariantDeviceProfile)} */
|
||||
@@ -930,7 +930,7 @@ public class GridSizeMigrationTask {
|
||||
.getBinder(Settings.EXTRA_VALUE)) {
|
||||
|
||||
int srcHotseatCount = prefs.getInt(KEY_MIGRATION_SRC_HOTSEAT_COUNT,
|
||||
idp.numHotseatIcons);
|
||||
idp.numDatabaseHotseatIcons);
|
||||
Point sourceSize = parsePoint(prefs.getString(
|
||||
KEY_MIGRATION_SRC_WORKSPACE_SIZE, gridSizeString));
|
||||
|
||||
@@ -950,10 +950,10 @@ public class GridSizeMigrationTask {
|
||||
|
||||
HashSet<String> validPackages = getValidPackages(context);
|
||||
// Hotseat.
|
||||
if (srcHotseatCount != idp.numHotseatIcons
|
||||
if (srcHotseatCount != idp.numDatabaseHotseatIcons
|
||||
&& new GridSizeMigrationTask(context, transaction.getDb(), validPackages,
|
||||
migrateForPreview, srcHotseatCount,
|
||||
idp.numHotseatIcons).migrateHotseat()) {
|
||||
idp.numDatabaseHotseatIcons).migrateHotseat()) {
|
||||
dbChanged = true;
|
||||
}
|
||||
|
||||
@@ -993,7 +993,7 @@ public class GridSizeMigrationTask {
|
||||
// Save current configuration, so that the migration does not run again.
|
||||
prefs.edit()
|
||||
.putString(KEY_MIGRATION_SRC_WORKSPACE_SIZE, gridSizeString)
|
||||
.putInt(KEY_MIGRATION_SRC_HOTSEAT_COUNT, idp.numHotseatIcons)
|
||||
.putInt(KEY_MIGRATION_SRC_HOTSEAT_COUNT, idp.numDatabaseHotseatIcons)
|
||||
.apply();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user