mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 07:46:55 +00:00
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:
@@ -192,8 +192,9 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
// Update shortcuts which use iconResource.
|
||||
if ((si.iconResource != null)
|
||||
&& packageSet.contains(si.iconResource.packageName)) {
|
||||
BitmapInfo iconInfo =
|
||||
LauncherIcons.createIconBitmap(si.iconResource, context);
|
||||
LauncherIcons li = LauncherIcons.obtain(context);
|
||||
BitmapInfo iconInfo = li.createIconBitmap(si.iconResource);
|
||||
li.recycle();
|
||||
if (iconInfo != null) {
|
||||
iconInfo.applyTo(si);
|
||||
infoUpdated = true;
|
||||
|
||||
Reference in New Issue
Block a user