Configured color attribute properly for focus outline

Bug: 310953377
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_focus_outline Development
Change-Id: If85c33ecea3241e69927917e910386d0346ef43b
This commit is contained in:
helencheuk committed 2024-01-15 18:35:11 +00:00
1 parent 1438af66f8
commit 2691cdfa8b
4 files changed
+6 -3

No files matched your search

@@ -22,6 +22,7 @@ import android.view.View.OnFocusChangeListener;
import com.android.launcher3.Flags;
import com.android.launcher3.R;
import com.android.launcher3.util.Themes;
/**
* A helper class to draw background of a focused view.
@@ -30,8 +31,9 @@ public abstract class FocusIndicatorHelper extends ItemFocusIndicatorHelper<View
implements OnFocusChangeListener {
public FocusIndicatorHelper(View container) {
super(container, container.getResources().getColor(Flags.enableFocusOutline()
? R.color.focus_outline_color : R.color.focused_background));
super(container, Flags.enableFocusOutline() ? Themes.getAttrColor(container.getContext(),
R.attr.focusOutlineColor)
: container.getResources().getColor(R.color.focused_background));
}
@Override