mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Create a param to return scale used for bitmap creation
Bug: 110082040 Change-Id: I35254289a216be4db96f452db184454581a59b32
This commit is contained in:
@@ -182,7 +182,12 @@ public class LauncherIcons implements AutoCloseable {
|
||||
* The bitmap is also visually normalized with other icons.
|
||||
*/
|
||||
public BitmapInfo createBadgedIconBitmap(Drawable icon, UserHandle user, int iconAppTargetSdk) {
|
||||
return createBadgedIconBitmap(icon, user, iconAppTargetSdk, false);
|
||||
return createBadgedIconBitmap(icon, user, iconAppTargetSdk, false, null);
|
||||
}
|
||||
|
||||
public BitmapInfo createBadgedIconBitmap(Drawable icon, UserHandle user, int iconAppTargetSdk,
|
||||
boolean isInstantApp) {
|
||||
return createBadgedIconBitmap(icon, user, iconAppTargetSdk, isInstantApp, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,8 +196,10 @@ public class LauncherIcons implements AutoCloseable {
|
||||
* The bitmap is also visually normalized with other icons.
|
||||
*/
|
||||
public BitmapInfo createBadgedIconBitmap(Drawable icon, UserHandle user, int iconAppTargetSdk,
|
||||
boolean isInstantApp) {
|
||||
float[] scale = new float[1];
|
||||
boolean isInstantApp, float [] scale) {
|
||||
if (scale == null) {
|
||||
scale = new float[1];
|
||||
}
|
||||
icon = normalizeAndWrapToAdaptiveIcon(icon, iconAppTargetSdk, null, scale);
|
||||
Bitmap bitmap = createIconBitmap(icon, scale[0]);
|
||||
if (Utilities.ATLEAST_OREO && icon instanceof AdaptiveIconDrawable) {
|
||||
|
||||
Reference in New Issue
Block a user