mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Moving some common functionality to IconLoaderLib
Bug: 183641907 Test: Manual Change-Id: Icfc7ebb140e4e1678b0715beee2e0e513e707b9e
This commit is contained in:
@@ -23,6 +23,7 @@ import android.content.Intent;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.icons.BitmapInfo;
|
||||
import com.android.launcher3.icons.FastBitmapDrawable;
|
||||
import com.android.launcher3.pm.PackageInstallInfo;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
|
||||
@@ -216,4 +217,14 @@ public abstract class ItemInfoWithIcon extends ItemInfo {
|
||||
* @return a copy of this
|
||||
*/
|
||||
public abstract ItemInfoWithIcon clone();
|
||||
|
||||
|
||||
/**
|
||||
* Returns a FastBitmapDrawable with the icon.
|
||||
*/
|
||||
public FastBitmapDrawable newIcon(Context context) {
|
||||
FastBitmapDrawable drawable = bitmap.newIcon(context);
|
||||
drawable.setIsDisabled(isDisabled());
|
||||
return drawable;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user