mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +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:
@@ -469,8 +469,11 @@ public class WidgetPreviewLoader {
|
||||
}
|
||||
RectF boxRect = drawBoxWithShadow(c, size, size);
|
||||
|
||||
Bitmap icon = LauncherIcons.createScaledBitmapWithoutShadow(
|
||||
mutateOnMainThread(info.getFullResIcon(mIconCache)), mContext, 0);
|
||||
LauncherIcons li = LauncherIcons.obtain(mContext);
|
||||
Bitmap icon = li.createScaledBitmapWithoutShadow(
|
||||
mutateOnMainThread(info.getFullResIcon(mIconCache)), 0);
|
||||
li.recycle();
|
||||
|
||||
Rect src = new Rect(0, 0, icon.getWidth(), icon.getHeight());
|
||||
|
||||
boxRect.set(0, 0, iconSize, iconSize);
|
||||
|
||||
Reference in New Issue
Block a user