Revert^2 "Unifying various model update callbacks into one"
72f9943f64
Change-Id: I38901714947a2b7926723ea25df4a2b8216303e4
This commit is contained in:
1 parent
72f9943f64
commit
dfbbebc9e3
19 files changed
+437
-370
No files matched your search
@@ -214,8 +214,7 @@ public class PackageUpdatedTask implements ModelUpdateTask {
|
||||
|
||||
// Update shortcut infos
|
||||
if (mOp == OP_ADD || flagOp != FlagOp.NO_OP) {
|
||||
final ArrayList<WorkspaceItemInfo> updatedWorkspaceItems = new ArrayList<>();
|
||||
final ArrayList<LauncherAppWidgetInfo> widgets = new ArrayList<>();
|
||||
final ArrayList<ItemInfo> updatedWorkspaceItems = new ArrayList<>();
|
||||
|
||||
// For system apps, package manager send OP_UPDATE when an app is enabled.
|
||||
final boolean isNewApkAvailable = mOp == OP_ADD || mOp == OP_UPDATE;
|
||||
@@ -364,8 +363,8 @@ public class PackageUpdatedTask implements ModelUpdateTask {
|
||||
// if the widget has a config activity. In case there is no config
|
||||
// activity, it will be marked as 'restored' during bind.
|
||||
widgetInfo.restoreStatus |= LauncherAppWidgetInfo.FLAG_UI_NOT_READY;
|
||||
|
||||
widgets.add(widgetInfo);
|
||||
widgetInfo.installProgress = 100;
|
||||
updatedWorkspaceItems.add(widgetInfo);
|
||||
taskController.getModelWriter().updateItemInDatabase(widgetInfo);
|
||||
});
|
||||
}
|
||||
@@ -377,10 +376,6 @@ public class PackageUpdatedTask implements ModelUpdateTask {
|
||||
"removing shortcuts with invalid target components."
|
||||
+ " ids=" + removedShortcuts);
|
||||
}
|
||||
|
||||
if (!widgets.isEmpty()) {
|
||||
taskController.scheduleCallbackTask(c -> c.bindWidgetsRestored(widgets));
|
||||
}
|
||||
}
|
||||
|
||||
final HashSet<String> removedPackages = new HashSet<>();
|
||||
|
||||
Reference in new issue
Block a user