Using WidgetInflater in loader task

This removes duplicate logic for widget inflation.
Since the widget inflation can now happen during loader,
the restore logging can also be moved completely to the loader

Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: If9f336e7bf49ee7df121d7d9852b674d98124895
This commit is contained in:
Sunny Goyal
2024-01-10 12:03:30 -08:00
parent 64614a1ec6
commit d24d33925a
17 changed files with 237 additions and 400 deletions

View File

@@ -65,6 +65,7 @@ import com.android.launcher3.LauncherSettings;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.Utilities;
import com.android.launcher3.backuprestore.LauncherRestoreEventLogger;
import com.android.launcher3.backuprestore.LauncherRestoreEventLogger.RestoreError;
import com.android.launcher3.logging.FileLog;
import com.android.launcher3.pm.UserCache;
import com.android.launcher3.provider.LauncherDbUtils;
@@ -89,7 +90,6 @@ public class ModelDbController {
private static final String TAG = "LauncherProvider";
private static final String EMPTY_DATABASE_CREATED = "EMPTY_DATABASE_CREATED";
private static final String RESTORE_ERROR_GRID_MIGRATION_FAILURE = "grid_migration_failed";
public static final String EXTRA_DB_NAME = "db_name";
protected DatabaseHelper mOpenHelper;
@@ -335,7 +335,7 @@ public class ModelDbController {
restoreEventLogger.logFavoritesItemsRestoreFailed(
cursor.getInt(cursor.getColumnIndexOrThrow(ITEM_TYPE)),
cursor.getInt(cursor.getColumnIndexOrThrow("count")),
RESTORE_ERROR_GRID_MIGRATION_FAILURE
RestoreError.GRID_MIGRATION_FAILURE
);
} while (cursor.moveToNext());
}