summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/IconCache.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-03-10 12:02:29 -0800
committerSunny Goyal <sunnygoyal@google.com>2016-03-18 11:06:01 -0700
commit4ddc40130aa0460924364eab3557088421eebe0c (patch)
tree4b8025aed86f3051c6826b151da50ab024418fbb /src/com/android/launcher3/IconCache.java
parent1bc8fc3de2113b7be9df304309a42276d642a8c4 (diff)
downloadandroid_packages_apps_Trebuchet-4ddc40130aa0460924364eab3557088421eebe0c.tar.gz
android_packages_apps_Trebuchet-4ddc40130aa0460924364eab3557088421eebe0c.tar.bz2
android_packages_apps_Trebuchet-4ddc40130aa0460924364eab3557088421eebe0c.zip
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
Diffstat (limited to 'src/com/android/launcher3/IconCache.java')
-rw-r--r--src/com/android/launcher3/IconCache.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index e1c52b2e6..84bfd89c3 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -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) {