mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Moving LoaderTask static
Will move it to a separate file in a followup cl. This simplifies dependencies between LauncherModel and LoaderTask which and making it easier to start the loader before Launcher activity is created (as the Callbacks in LauncherModel can change while loader is running). Bug: 34112546 Bug: 37616877 Change-Id: Ie9619c6b0de0e3eb60657c04ae1b58d946c829e9
This commit is contained in:
@@ -44,6 +44,7 @@ import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.graphics.LauncherIcons;
|
||||
import com.android.launcher3.util.FlagOp;
|
||||
import com.android.launcher3.util.ItemInfoMatcher;
|
||||
import com.android.launcher3.util.MultiHashMap;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
|
||||
@@ -373,11 +374,9 @@ public class PackageUpdatedTask extends ExtendedModelTask {
|
||||
} else if (Utilities.isAtLeastO() && mOp == OP_ADD) {
|
||||
// Load widgets for the new package.
|
||||
for (int i = 0; i < N; i++) {
|
||||
LauncherModel model = app.getModel();
|
||||
model.refreshAndBindWidgetsAndShortcuts(
|
||||
model.getCallback(), false /* bindFirst */,
|
||||
new PackageUserKey(packages[i], mUser) /* packageUser */);
|
||||
dataModel.widgetsModel.update(app, new PackageUserKey(packages[i], mUser));
|
||||
}
|
||||
bindUpdatedWidgets(dataModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user