Merge "Add new failsafe to disable new archiving broadcast" into main

This commit is contained in:
Charlie Anderson authored and Android (Google) Code Review committed 2024-12-13 07:33:49 -08:00
commit 9a2e3a715b
2 files changed
+65 -86

No files matched your search

@@ -214,13 +214,13 @@ public class LoaderTask implements Runnable {
ArrayList<ItemInfo> firstScreenItems = new ArrayList<>();
filterCurrentWorkspaceItems(firstScreens, allItems, firstScreenItems,
new ArrayList<>() /* otherScreenItems are ignored */);
final int launcherBroadcastInstalledApps = Settings.Secure.getInt(
final int disableArchivingLauncherBroadcast = Settings.Secure.getInt(
mApp.getContext().getContentResolver(),
"launcher_broadcast_installed_apps",
/* def= */ 0);
"disable_launcher_broadcast_installed_apps",
/* default */ 0);
boolean shouldAttachArchivingExtras = mIsRestoreFromBackup
&& (launcherBroadcastInstalledApps == 1
|| Flags.enableFirstScreenBroadcastArchivingExtras());
&& disableArchivingLauncherBroadcast == 0
&& Flags.enableFirstScreenBroadcastArchivingExtras();
if (shouldAttachArchivingExtras) {
List<FirstScreenBroadcastModel> broadcastModels =
FirstScreenBroadcastHelper.createModelsForFirstScreenBroadcast(
@@ -232,6 +232,7 @@ public class LoaderTask implements Runnable {
logASplit("Sending first screen broadcast with additional archiving Extras");
FirstScreenBroadcastHelper.sendBroadcastsForModels(mApp.getContext(), broadcastModels);
} else {
logASplit("Sending first screen broadcast");
mFirstScreenBroadcast.sendBroadcasts(mApp.getContext(), firstScreenItems);
}
}
@@ -277,7 +278,6 @@ public class LoaderTask implements Runnable {
mModelDelegate.workspaceLoadComplete();
// Notify the installer packages of packages with active installs on the first screen.
sendFirstScreenActiveInstallsBroadcast();
logASplit("sendFirstScreenBroadcast finished");
// Take a break
waitForIdle();