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
2024-01-02 15:19:12 +00:00
parent 1438af66f8
commit 2691cdfa8b
4 changed files with 6 additions and 3 deletions
@@ -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