Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ed2b1ad authored by Jiaquan He's avatar Jiaquan He Committed by android-build-merger
Browse files

Merge changes from topics 'KeyboardFocusHighlight-oc-dev',...

Merge changes from topics 'KeyboardFocusHighlight-oc-dev', 'KeyboardFocusHighlight_ mDefaultFocusHighlightEnabled-oc-dev', 'KeyboardFocusHighlight_ hasFocusStateSpecified-oc-dev' into oc-dev
am: 18d993bb

Change-Id: Ic8d6df348c0c3908e32ae8dc288ee48b5a731163
parents d415eac1 18d993bb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19712,13 +19712,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *     <li>This view is not in touch mode.</li>
     *     <li>This view doesn't opt out for a default focus highlight, via
     *         {@link #setDefaultFocusHighlightEnabled(boolean)}.</li>
     *     <li>This view is attached to window.</li>
     * </ul>
     * @return {@code true} if a default focus highlight is needed.
     */
    private boolean isDefaultFocusHighlightNeeded(Drawable background) {
        final boolean hasFocusStateSpecified = background == null || !background.isStateful()
                || !background.hasFocusStateSpecified();
        return !isInTouchMode() && getDefaultFocusHighlightEnabled() && hasFocusStateSpecified;
        return !isInTouchMode() && getDefaultFocusHighlightEnabled() && hasFocusStateSpecified
                && isAttachedToWindow();
    }
    /**