Loading res/raw/downgrade_schema.json +2 −1 Original line number Diff line number Diff line Loading @@ -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" : 30, "version" : 31, "downgrade_to_30" : [], "downgrade_to_29" : [], "downgrade_to_28" : [ "ALTER TABLE favorites RENAME TO temp_favorites;", Loading src/com/android/launcher3/LauncherProvider.java +14 −1 Original line number Diff line number Diff line Loading @@ -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 = 30; public static final int SCHEMA_VERSION = 31; public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".settings"; public static final String KEY_LAYOUT_PROVIDER_AUTHORITY = "KEY_LAYOUT_PROVIDER_AUTHORITY"; Loading Loading @@ -864,6 +864,19 @@ public class LauncherProvider extends ContentProvider { Favorites.SCREEN, IntArray.wrap(-777, -778)), null); } case 30: { if (FeatureFlags.QSB_ON_FIRST_SCREEN) { // Clean up first row in screen 0 as it might contain junk data. Log.d(TAG, "Cleaning up first row"); db.delete(Favorites.TABLE_NAME, String.format(Locale.ENGLISH, "%1$s = %2$d AND %3$s = %4$d AND %5$s = %6$d", Favorites.SCREEN, 0, Favorites.CONTAINER, Favorites.CONTAINER_DESKTOP, Favorites.CELLY, 0), null); } return; } case 31: { // DB Upgraded successfully return; } Loading src/com/android/launcher3/model/LoaderCursor.java +6 −4 Original line number Diff line number Diff line Loading @@ -457,11 +457,13 @@ public class LoaderCursor extends CursorWrapper { if (!occupied.containsKey(item.screenId)) { GridOccupancy screen = new GridOccupancy(countX + 1, countY + 1); if (item.screenId == Workspace.FIRST_SCREEN_ID) { // Mark the first row as occupied (if the feature is enabled) // in order to account for the QSB. if (item.screenId == Workspace.FIRST_SCREEN_ID && FeatureFlags.QSB_ON_FIRST_SCREEN) { // Mark the first X columns (X is width of the search container) in the first row as // occupied (if the feature is enabled) in order to account for the search // container. int spanX = mIDP.numSearchContainerColumns; int spanY = FeatureFlags.EXPANDED_SMARTSPACE.get() ? 2 : 1; screen.markCells(0, 0, countX + 1, spanY, FeatureFlags.QSB_ON_FIRST_SCREEN); screen.markCells(0, 0, spanX, spanY, true); } occupied.put(item.screenId, screen); } Loading Loading
res/raw/downgrade_schema.json +2 −1 Original line number Diff line number Diff line Loading @@ -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" : 30, "version" : 31, "downgrade_to_30" : [], "downgrade_to_29" : [], "downgrade_to_28" : [ "ALTER TABLE favorites RENAME TO temp_favorites;", Loading
src/com/android/launcher3/LauncherProvider.java +14 −1 Original line number Diff line number Diff line Loading @@ -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 = 30; public static final int SCHEMA_VERSION = 31; public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".settings"; public static final String KEY_LAYOUT_PROVIDER_AUTHORITY = "KEY_LAYOUT_PROVIDER_AUTHORITY"; Loading Loading @@ -864,6 +864,19 @@ public class LauncherProvider extends ContentProvider { Favorites.SCREEN, IntArray.wrap(-777, -778)), null); } case 30: { if (FeatureFlags.QSB_ON_FIRST_SCREEN) { // Clean up first row in screen 0 as it might contain junk data. Log.d(TAG, "Cleaning up first row"); db.delete(Favorites.TABLE_NAME, String.format(Locale.ENGLISH, "%1$s = %2$d AND %3$s = %4$d AND %5$s = %6$d", Favorites.SCREEN, 0, Favorites.CONTAINER, Favorites.CONTAINER_DESKTOP, Favorites.CELLY, 0), null); } return; } case 31: { // DB Upgraded successfully return; } Loading
src/com/android/launcher3/model/LoaderCursor.java +6 −4 Original line number Diff line number Diff line Loading @@ -457,11 +457,13 @@ public class LoaderCursor extends CursorWrapper { if (!occupied.containsKey(item.screenId)) { GridOccupancy screen = new GridOccupancy(countX + 1, countY + 1); if (item.screenId == Workspace.FIRST_SCREEN_ID) { // Mark the first row as occupied (if the feature is enabled) // in order to account for the QSB. if (item.screenId == Workspace.FIRST_SCREEN_ID && FeatureFlags.QSB_ON_FIRST_SCREEN) { // Mark the first X columns (X is width of the search container) in the first row as // occupied (if the feature is enabled) in order to account for the search // container. int spanX = mIDP.numSearchContainerColumns; int spanY = FeatureFlags.EXPANDED_SMARTSPACE.get() ? 2 : 1; screen.markCells(0, 0, countX + 1, spanY, FeatureFlags.QSB_ON_FIRST_SCREEN); screen.markCells(0, 0, spanX, spanY, true); } occupied.put(item.screenId, screen); } Loading