Making LauncherIcons thread safe

Creating a pool of LauncherIcons so that they can be used from multiple threads

Change-Id: Idc7b5ddb47b6e338a5389f3c4faa6f63de108c72
This commit is contained in:
Sunny Goyal committed 2018-01-09 17:30:52 -08:00
1 parent 383b7fa02a
commit 18a4e5aefb
21 files changed
+276 -391

No files matched your search

@@ -437,9 +437,11 @@ public class AutoInstallsLayout {
}
// Auto installs should always support the current platform version.
LauncherIcons li = LauncherIcons.obtain(mContext);
mValues.put(LauncherSettings.Favorites.ICON, Utilities.flattenBitmap(
LauncherIcons.createBadgedIconBitmap(
icon, Process.myUserHandle(), mContext, VERSION.SDK_INT).icon));
li.createBadgedIconBitmap(icon, Process.myUserHandle(), VERSION.SDK_INT).icon));
li.recycle();
mValues.put(Favorites.ICON_PACKAGE, mIconRes.getResourcePackageName(iconId));
mValues.put(Favorites.ICON_RESOURCE, mIconRes.getResourceName(iconId));