Merge "Remove widget panel related leftover workspace items" into sc-v2-dev am: 69fd5cb959
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15763353 Change-Id: Iecc4d2a2013a44c278a71e32e3d6c5c4737e289d
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
// Note: Comments are not supported in JSON schema, but android parser is lenient.
|
||||
|
||||
// Maximum DB version supported by this schema
|
||||
"version" : 29,
|
||||
"version" : 30,
|
||||
|
||||
"downgrade_to_29" : [],
|
||||
"downgrade_to_28" : [
|
||||
"ALTER TABLE favorites RENAME TO temp_favorites;",
|
||||
"CREATE TABLE favorites(_id INTEGER PRIMARY KEY, title TEXT, intent TEXT, container INTEGER, screen INTEGER, cellX INTEGER, cellY INTEGER, spanX INTEGER, spanY INTEGER, itemType INTEGER, appWidgetId INTEGER NOT NULL DEFAULT - 1, iconPackage TEXT, iconResource TEXT, icon BLOB, appWidgetProvider TEXT, modified INTEGER NOT NULL DEFAULT 0, restored INTEGER NOT NULL DEFAULT 0, profileId INTEGER DEFAULT 0, rank INTEGER NOT NULL DEFAULT 0, options INTEGER NOT NULL DEFAULT 0);",
|
||||
|
||||
@@ -97,7 +97,7 @@ public class LauncherProvider extends ContentProvider {
|
||||
* Represents the schema of the database. Changes in scheme need not be backwards compatible.
|
||||
* When increasing the scheme version, ensure that downgrade_schema.json is updated
|
||||
*/
|
||||
public static final int SCHEMA_VERSION = 29;
|
||||
public static final int SCHEMA_VERSION = 30;
|
||||
|
||||
public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".settings";
|
||||
public static final String KEY_LAYOUT_PROVIDER_AUTHORITY = "KEY_LAYOUT_PROVIDER_AUTHORITY";
|
||||
@@ -864,6 +864,11 @@ public class LauncherProvider extends ContentProvider {
|
||||
}
|
||||
}
|
||||
case 29: {
|
||||
// Remove widget panel related leftover workspace items
|
||||
db.delete(Favorites.TABLE_NAME, Utilities.createDbSelectionQuery(
|
||||
Favorites.SCREEN, IntArray.wrap(-777, -778)), null);
|
||||
}
|
||||
case 30: {
|
||||
// DB Upgraded successfully
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user