Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfo

In PackageItemInfo,, using the user of the first item in the sub-list

Bug: 27585511
Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
This commit is contained in:
Sunny Goyal
2016-03-18 11:06:01 -07:00
parent 1bc8fc3de2
commit 4ddc40130a
7 changed files with 169 additions and 262 deletions
+9 -9
View File
@@ -410,7 +410,7 @@ public class IconCache {
st.user, false);
} else if (info instanceof PackageItemInfo) {
PackageItemInfo pti = (PackageItemInfo) info;
getTitleAndIconForApp(pti.packageName, pti.user, false, pti);
getTitleAndIconForApp(pti, false);
}
mMainThreadExecutor.execute(new Runnable() {
@@ -507,16 +507,16 @@ public class IconCache {
}
/**
* Fill in {@param appInfo} with the icon and label for {@param packageName}
* Fill in {@param infoInOut} with the corresponding icon and label.
*/
public synchronized void getTitleAndIconForApp(
String packageName, UserHandleCompat user, boolean useLowResIcon,
PackageItemInfo infoOut) {
CacheEntry entry = getEntryForPackageLocked(packageName, user, useLowResIcon);
infoOut.iconBitmap = getNonNullIcon(entry, user);
infoOut.title = Utilities.trim(entry.title);
infoOut.usingLowResIcon = entry.isLowResIcon;
infoOut.contentDescription = entry.contentDescription;
PackageItemInfo infoInOut, boolean useLowResIcon) {
CacheEntry entry = getEntryForPackageLocked(
infoInOut.packageName, infoInOut.user, useLowResIcon);
infoInOut.iconBitmap = getNonNullIcon(entry, infoInOut.user);
infoInOut.title = Utilities.trim(entry.title);
infoInOut.usingLowResIcon = entry.isLowResIcon;
infoInOut.contentDescription = entry.contentDescription;
}
public synchronized Bitmap getDefaultIcon(UserHandleCompat user) {