diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-01-11 10:48:34 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-01-11 12:52:03 -0800 |
commit | 87f784c285fdeed9091a4de8b9b44db3eca677d8 (patch) | |
tree | 94870e68378e8d0e1fb09555fc1be4ca149ba99b /src/com/android/launcher3/ShortcutInfo.java | |
parent | 41307051416b3e027d89e72301704432bd1c5eb3 (diff) | |
download | android_packages_apps_Trebuchet-87f784c285fdeed9091a4de8b9b44db3eca677d8.tar.gz android_packages_apps_Trebuchet-87f784c285fdeed9091a4de8b9b44db3eca677d8.tar.bz2 android_packages_apps_Trebuchet-87f784c285fdeed9091a4de8b9b44db3eca677d8.zip |
Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context
Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
Diffstat (limited to 'src/com/android/launcher3/ShortcutInfo.java')
-rw-r--r-- | src/com/android/launcher3/ShortcutInfo.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java index 77c6837d0..8c83dff2b 100644 --- a/src/com/android/launcher3/ShortcutInfo.java +++ b/src/com/android/launcher3/ShortcutInfo.java @@ -235,7 +235,7 @@ public class ShortcutInfo extends ItemInfoWithIcon { disabledMessage = shortcutInfo.getDisabledMessage(); // TODO: Use cache for this - LauncherAppState launcherAppState = LauncherAppState.getInstance(); + LauncherAppState launcherAppState = LauncherAppState.getInstance(context); Drawable unbadgedDrawable = DeepShortcutManager.getInstance(context) .getShortcutIconDrawable(shortcutInfo, launcherAppState.getInvariantDeviceProfile().fillResIconDpi); @@ -249,7 +249,7 @@ public class ShortcutInfo extends ItemInfoWithIcon { protected Bitmap getBadgedIcon(Bitmap unbadgedBitmap, ShortcutInfoCompat shortcutInfo, IconCache cache, Context context) { - unbadgedBitmap = LauncherIcons.addShadowToIcon(unbadgedBitmap); + unbadgedBitmap = LauncherIcons.addShadowToIcon(unbadgedBitmap, context); // Get the app info for the source activity. AppInfo appInfo = new AppInfo(); appInfo.user = user; |