mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Setup make icon-loader library
Bug: 115891474 Test: make -j10 icon-loader Next step: Launcher will depend on icon-loader in next CL Change-Id: I797ddb857cf8be79f3be6ca2f174c593ca3713a5
This commit is contained in:
@@ -153,7 +153,7 @@ public class LoaderCursor extends CursorWrapper {
|
||||
info.title = getTitle();
|
||||
// the fallback icon
|
||||
if (!loadIcon(info)) {
|
||||
mIconCache.getDefaultIcon(info.user).applyTo(info);
|
||||
info.applyFrom(mIconCache.getDefaultIcon(info.user));
|
||||
}
|
||||
|
||||
// TODO: If there's an explicit component and we can't install that, delete it.
|
||||
@@ -176,7 +176,7 @@ public class LoaderCursor extends CursorWrapper {
|
||||
BitmapInfo iconInfo = li.createIconBitmap(info.iconResource);
|
||||
li.recycle();
|
||||
if (iconInfo != null) {
|
||||
iconInfo.applyTo(info);
|
||||
info.applyFrom(iconInfo);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public class LoaderCursor extends CursorWrapper {
|
||||
// Failed to load from resource, try loading from DB.
|
||||
byte[] data = getBlob(iconIndex);
|
||||
try (LauncherIcons li = LauncherIcons.obtain(mContext)) {
|
||||
li.createIconBitmap(BitmapFactory.decodeByteArray(data, 0, data.length)).applyTo(info);
|
||||
info.applyFrom(li.createIconBitmap(BitmapFactory.decodeByteArray(data, 0, data.length)));
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to load icon for info " + info, e);
|
||||
|
||||
Reference in New Issue
Block a user