Force persistent taskbar all apps icon to light version.

Persistent taskbar background is always dark regardless of device theme,
so we should make the icon always light for now.

Test: Manual
Fix: 262837720
Change-Id: I8f66af874e07f68e1943245e9cd49c3b3107915f
This commit is contained in:
Brian Isganitis committed 2023-02-01 12:07:58 -08:00
1 parent f667823a8e
commit 748094b185
6 files changed
+23 -7

No files matched your search

@@ -30,6 +30,8 @@ import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import androidx.annotation.ColorInt;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.icons.BaseIconFactory;
import com.android.launcher3.icons.FastBitmapDrawable;
@@ -68,6 +70,14 @@ public class IconButtonView extends BubbleTextView {
}
}
/** Updates the color of the icon's foreground layer. */
public void setForegroundTint(@ColorInt int tintColor) {
FastBitmapDrawable icon = getIcon();
if (icon instanceof IconDrawable) {
((IconDrawable) icon).mFg.setTint(tintColor);
}
}
private static class IconDrawable extends FastBitmapDrawable {
private final Drawable mFg;