diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2020-02-06 11:28:01 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2020-02-06 14:16:34 -0800 |
commit | 18204e4eeaaea47a55dc1f217f6a79d00043e5b0 (patch) | |
tree | 6b91bb75eb5d2b8128501dfed5ca144be22bd6a9 /src_shortcuts_overrides | |
parent | a0912d502a3228c64d5734312bed5c4f698d764a (diff) | |
download | Launcher3-18204e4eeaaea47a55dc1f217f6a79d00043e5b0.tar.gz |
Various icon cache fixes
> Multiple instances of LauncherIcon created when
LauncherIcons refers IconCache which in turn creates new LauncherIcons
> Widget icons are never cached as they were using low res icons
> Shortcut drag icons are not loaded synchronously
when using PinItemRequest flow
> Wrong lastUpdatedTime is used in iconCache for shortcuts
> IconUpdateHandler does not ignore managedUser promise icons
Change-Id: Ie7eed68a30fad11d1861b6c70c380953a15ae1cf
Diffstat (limited to 'src_shortcuts_overrides')
-rw-r--r-- | src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java b/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java index 22c087453a..5ebf8d397f 100644 --- a/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java +++ b/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java @@ -21,7 +21,7 @@ import com.android.launcher3.LauncherAppWidgetProviderInfo; import com.android.launcher3.Utilities; import com.android.launcher3.compat.AlphabeticIndexCompat; import com.android.launcher3.config.FeatureFlags; -import com.android.launcher3.icons.ComponentWithLabel; +import com.android.launcher3.icons.ComponentWithLabelAndIcon; import com.android.launcher3.icons.IconCache; import com.android.launcher3.pm.ShortcutConfigActivityInfo; import com.android.launcher3.util.MultiHashMap; @@ -85,12 +85,13 @@ public class WidgetsModel { * @param packageUser If null, all widgets and shortcuts are updated and returned, otherwise * only widgets and shortcuts associated with the package/user are. */ - public List<ComponentWithLabel> update(LauncherAppState app, @Nullable PackageUserKey packageUser) { + public List<ComponentWithLabelAndIcon> update( + LauncherAppState app, @Nullable PackageUserKey packageUser) { Preconditions.assertWorkerThread(); Context context = app.getContext(); final ArrayList<WidgetItem> widgetsAndShortcuts = new ArrayList<>(); - List<ComponentWithLabel> updatedItems = new ArrayList<>(); + List<ComponentWithLabelAndIcon> updatedItems = new ArrayList<>(); try { InvariantDeviceProfile idp = app.getInvariantDeviceProfile(); PackageManager pm = app.getContext().getPackageManager(); |