diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-09-01 12:50:11 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-09-02 12:34:33 -0700 |
commit | 10629b077c65b648be6a8603a092322d8a2c2c50 (patch) | |
tree | 0542a6a28717bd0e29fe6df63fcddb94fc8ae78e /src/com/android/launcher3/ShortcutInfo.java | |
parent | 6677eb7668344ef05637bc48982439ed336c7499 (diff) | |
download | android_packages_apps_Trebuchet-10629b077c65b648be6a8603a092322d8a2c2c50.tar.gz android_packages_apps_Trebuchet-10629b077c65b648be6a8603a092322d8a2c2c50.tar.bz2 android_packages_apps_Trebuchet-10629b077c65b648be6a8603a092322d8a2c2c50.zip |
Moving some image handling classes to .graphics package
Change-Id: Id6d3d0b9c345a503ff2e09f073eb4b6449e21c7e
Diffstat (limited to 'src/com/android/launcher3/ShortcutInfo.java')
-rw-r--r-- | src/com/android/launcher3/ShortcutInfo.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java index 9d7be1693..9b4bfbcad 100644 --- a/src/com/android/launcher3/ShortcutInfo.java +++ b/src/com/android/launcher3/ShortcutInfo.java @@ -31,6 +31,7 @@ import com.android.launcher3.compat.LauncherActivityInfoCompat; import com.android.launcher3.compat.UserHandleCompat; import com.android.launcher3.compat.UserManagerCompat; import com.android.launcher3.folder.FolderIcon; +import com.android.launcher3.graphics.LauncherIcons; import com.android.launcher3.shortcuts.ShortcutInfoCompat; /** @@ -323,13 +324,13 @@ public class ShortcutInfo extends ItemInfo { IconCache cache = launcherAppState.getIconCache(); Bitmap unbadgedBitmap = unbadgedDrawable == null ? cache.getDefaultIcon(UserHandleCompat.myUserHandle()) - : Utilities.createScaledBitmapWithoutShadow(unbadgedDrawable, context); + : LauncherIcons.createScaledBitmapWithoutShadow(unbadgedDrawable, context); setIcon(getBadgedIcon(unbadgedBitmap, shortcutInfo, cache, context)); } protected Bitmap getBadgedIcon(Bitmap unbadgedBitmap, ShortcutInfoCompat shortcutInfo, IconCache cache, Context context) { - unbadgedBitmap = Utilities.addShadowToIcon(unbadgedBitmap); + unbadgedBitmap = LauncherIcons.addShadowToIcon(unbadgedBitmap); // Get the app info for the source activity. AppInfo appInfo = new AppInfo(); appInfo.user = user; @@ -338,9 +339,9 @@ public class ShortcutInfo extends ItemInfo { cache.getTitleAndIcon(appInfo, shortcutInfo.getActivityInfo(context), false); } catch (NullPointerException e) { // This may happen when we fail to load the activity info. Worst case ignore badging. - return Utilities.badgeIconForUser(unbadgedBitmap, user, context); + return LauncherIcons.badgeIconForUser(unbadgedBitmap, user, context); } - return Utilities.badgeWithBitmap(unbadgedBitmap, appInfo.iconBitmap, context); + return LauncherIcons.badgeWithBitmap(unbadgedBitmap, appInfo.iconBitmap, context); } /** Returns the ShortcutInfo id associated with the deep shortcut. */ |