summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics/LauncherIcons.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/graphics/LauncherIcons.java')
-rw-r--r--src/com/android/launcher3/graphics/LauncherIcons.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/graphics/LauncherIcons.java b/src/com/android/launcher3/graphics/LauncherIcons.java
index 9f3f3571d..6f9f7ffc9 100644
--- a/src/com/android/launcher3/graphics/LauncherIcons.java
+++ b/src/com/android/launcher3/graphics/LauncherIcons.java
@@ -18,6 +18,7 @@ package com.android.launcher3.graphics;
import android.annotation.TargetApi;
import android.content.Context;
+import android.content.Intent.ShortcutIconResource;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.database.Cursor;
@@ -66,14 +67,13 @@ public class LauncherIcons {
* Returns a bitmap suitable for the all apps view. If the package or the resource do not
* exist, it returns null.
*/
- public static Bitmap createIconBitmap(String packageName, String resourceName,
- Context context) {
+ public static Bitmap createIconBitmap(ShortcutIconResource iconRes, Context context) {
PackageManager packageManager = context.getPackageManager();
// the resource
try {
- Resources resources = packageManager.getResourcesForApplication(packageName);
+ Resources resources = packageManager.getResourcesForApplication(iconRes.packageName);
if (resources != null) {
- final int id = resources.getIdentifier(resourceName, null, null);
+ final int id = resources.getIdentifier(iconRes.resourceName, null, null);
return createIconBitmap(
resources.getDrawableForDensity(id, LauncherAppState.getInstance()
.getInvariantDeviceProfile().fillResIconDpi), context);