Log widgets source.

Test: manual
(1) Upgrading to new DB version is successful (no errors thrown in logcat)
(2) Widgets that were added with the old DB version have CONTAINER_UNKNOWN as their source container
(3) Widgets that are added with the new DB version still log source container after reboot
Bug: 185778648
Change-Id: Iaa38f0be6bc4cb0d29842f9a2ea0d08de000c930
This commit is contained in:
Yogisha Dixit
2021-05-24 23:23:15 +01:00
parent 814d644d81
commit 658c5dafd4
16 changed files with 139 additions and 17 deletions

View File

@@ -379,6 +379,8 @@ public class LoaderTask implements Runnable {
LauncherSettings.Favorites.RANK);
final int optionsIndex = c.getColumnIndexOrThrow(
LauncherSettings.Favorites.OPTIONS);
final int sourceContainerIndex = c.getColumnIndexOrThrow(
LauncherSettings.Favorites.APPWIDGET_SOURCE);
final LongSparseArray<Boolean> unlockedUsers = new LongSparseArray<>();
@@ -746,6 +748,7 @@ public class LoaderTask implements Runnable {
appWidgetInfo.spanY = c.getInt(spanYIndex);
appWidgetInfo.options = c.getInt(optionsIndex);
appWidgetInfo.user = c.user;
appWidgetInfo.sourceContainer = c.getInt(sourceContainerIndex);
if (appWidgetInfo.spanX <= 0 || appWidgetInfo.spanY <= 0) {
c.markDeleted("Widget has invalid size: "