mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Show icon in PendingAppWidgetHostView immediately.
Before this change, PendingAppWidgetHostView would appear 'blank' until they were loaded -- which could take a while depending on how many apps the user had, because the all apps icons are loaded first. Bug: 36815047 Change-Id: Ia7449cce4341ed9e9384fc8aaadeaae6c33bb262
This commit is contained in:
@@ -80,10 +80,13 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView
|
||||
updateAppWidget(null);
|
||||
setOnClickListener(mLauncher);
|
||||
|
||||
// Load icon
|
||||
PackageItemInfo item = new PackageItemInfo(info.providerName.getPackageName());
|
||||
item.user = info.user;
|
||||
cache.updateIconInBackground(this, item);
|
||||
if (info.pendingItemInfo == null) {
|
||||
info.pendingItemInfo = new PackageItemInfo(info.providerName.getPackageName());
|
||||
info.pendingItemInfo.user = info.user;
|
||||
cache.updateIconInBackground(this, info.pendingItemInfo);
|
||||
} else {
|
||||
reapplyItemInfo(info.pendingItemInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user