mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Do not theme icons when the original view is not themed.
Fixes bug where animations uses themed icons in All Apps, where the icons are not themed. We want the DragView themed since all valid drop locations will have it appear themed. Bug: 215650713 Test: open/close an app from All Apps Change-Id: I9969ce4921831dd12858ed9b0fe64379e9e3b188
This commit is contained in:
@@ -671,14 +671,15 @@ public final class Utilities {
|
||||
/**
|
||||
* Returns the full drawable for info without any flattening or pre-processing.
|
||||
*
|
||||
* @param outObj this is set to the internal data associated with {@param info},
|
||||
* @param shouldThemeIcon If true, will theme icons when applicable
|
||||
* @param outObj this is set to the internal data associated with {@code info},
|
||||
* eg {@link LauncherActivityInfo} or {@link ShortcutInfo}.
|
||||
*/
|
||||
@TargetApi(Build.VERSION_CODES.TIRAMISU)
|
||||
public static Drawable getFullDrawable(Context context, ItemInfo info, int width, int height,
|
||||
Object[] outObj) {
|
||||
boolean shouldThemeIcon, Object[] outObj) {
|
||||
Drawable icon = loadFullDrawableWithoutTheme(context, info, width, height, outObj);
|
||||
if (ATLEAST_T && icon instanceof AdaptiveIconDrawable) {
|
||||
if (ATLEAST_T && icon instanceof AdaptiveIconDrawable && shouldThemeIcon) {
|
||||
AdaptiveIconDrawable aid = (AdaptiveIconDrawable) icon.mutate();
|
||||
Drawable mono = aid.getMonochrome();
|
||||
if (mono != null && Themes.isThemedIconEnabled(context)) {
|
||||
|
||||
Reference in New Issue
Block a user