diff --git a/src/com/android/launcher3/keyboard/FocusIndicatorHelper.java b/src/com/android/launcher3/keyboard/FocusIndicatorHelper.java index c36f4552e3..3e320bdb35 100644 --- a/src/com/android/launcher3/keyboard/FocusIndicatorHelper.java +++ b/src/com/android/launcher3/keyboard/FocusIndicatorHelper.java @@ -57,18 +57,7 @@ public abstract class FocusIndicatorHelper extends ItemFocusIndicatorHelper implements AnimatorUpdateListe Rect newRect = getDrawRect(); if (newRect != null) { + if (Flags.enableFocusOutline()) { + // Stroke is drawn with half outside and half inside the view. Inset by half + // stroke width to move the whole stroke inside the view and avoid other views + // occluding it + int halfStrokeWidth = (int) mPaint.getStrokeWidth() / 2; + newRect.inset(halfStrokeWidth, halfStrokeWidth); + } mDirtyRect.set(newRect); c.drawRoundRect((float) mDirtyRect.left, (float) mDirtyRect.top, (float) mDirtyRect.right, (float) mDirtyRect.bottom,