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

Commit 55108ddd authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge changes I8af6bd3c,Id3af05b3 into nyc-mr1-dev-plus-aosp

* changes:
  Merge \"Add View reveal on focus hint\" into nyc-mr1-dev am: 5baca592
  Add View reveal on focus hint am: 7ec3fb39
parents 437fdf4d fa4ddfba
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42475,6 +42475,7 @@ package android.view {
    method public float getPivotY();
    method public android.view.PointerIcon getPointerIcon();
    method public android.content.res.Resources getResources();
    method public final boolean getRevealOnFocusHint();
    method public final int getRight();
    method protected float getRightFadingEdgeStrength();
    method protected int getRightPaddingOffset();
@@ -42762,6 +42763,7 @@ package android.view {
    method public void setPivotY(float);
    method public void setPointerIcon(android.view.PointerIcon);
    method public void setPressed(boolean);
    method public final void setRevealOnFocusHint(boolean);
    method public final void setRight(int);
    method public void setRotation(float);
    method public void setRotationX(float);
+2 −0
Original line number Diff line number Diff line
@@ -45641,6 +45641,7 @@ package android.view {
    method public float getPivotY();
    method public android.view.PointerIcon getPointerIcon();
    method public android.content.res.Resources getResources();
    method public final boolean getRevealOnFocusHint();
    method public final int getRight();
    method protected float getRightFadingEdgeStrength();
    method protected int getRightPaddingOffset();
@@ -45928,6 +45929,7 @@ package android.view {
    method public void setPivotY(float);
    method public void setPointerIcon(android.view.PointerIcon);
    method public void setPressed(boolean);
    method public final void setRevealOnFocusHint(boolean);
    method public final void setRight(int);
    method public void setRotation(float);
    method public void setRotationX(float);
+2 −0
Original line number Diff line number Diff line
@@ -42556,6 +42556,7 @@ package android.view {
    method public float getPivotY();
    method public android.view.PointerIcon getPointerIcon();
    method public android.content.res.Resources getResources();
    method public final boolean getRevealOnFocusHint();
    method public final int getRight();
    method protected float getRightFadingEdgeStrength();
    method protected int getRightPaddingOffset();
@@ -42843,6 +42844,7 @@ package android.view {
    method public void setPivotY(float);
    method public void setPointerIcon(android.view.PointerIcon);
    method public void setPressed(boolean);
    method public final void setRevealOnFocusHint(boolean);
    method public final void setRight(int);
    method public void setRotation(float);
    method public void setRotationX(float);
+52 −0
Original line number Diff line number Diff line
@@ -2435,6 +2435,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *          1                        PFLAG3_OVERLAPPING_RENDERING_FORCED_VALUE
     *         1                         PFLAG3_HAS_OVERLAPPING_RENDERING_FORCED
     *        1                          PFLAG3_TEMPORARY_DETACH
     *       1                           PFLAG3_NO_REVEAL_ON_FOCUS
     * |-------|-------|-------|-------|
     */
@@ -2676,6 +2677,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    static final int PFLAG3_TEMPORARY_DETACH = 0x2000000;
    /**
     * Flag indicating that the view does not wish to be revealed within its parent
     * hierarchy when it gains focus. Expressed in the negative since the historical
     * default behavior is to reveal on focus; this flag suppresses that behavior.
     *
     * @see #setRevealOnFocusHint(boolean)
     * @see #getRevealOnFocusHint()
     */
    private static final int PFLAG3_NO_REVEAL_ON_FOCUS = 0x4000000;
    /* End of masks for mPrivateFlags3 */
    /**
@@ -5940,6 +5951,47 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
    }
    /**
     * Sets this view's preference for reveal behavior when it gains focus.
     *
     * <p>When set to true, this is a signal to ancestor views in the hierarchy that
     * this view would prefer to be brought fully into view when it gains focus.
     * For example, a text field that a user is meant to type into. Other views such
     * as scrolling containers may prefer to opt-out of this behavior.</p>
     *
     * <p>The default value for views is true, though subclasses may change this
     * based on their preferred behavior.</p>
     *
     * @param revealOnFocus true to request reveal on focus in ancestors, false otherwise
     *
     * @see #getRevealOnFocusHint()
     */
    public final void setRevealOnFocusHint(boolean revealOnFocus) {
        if (revealOnFocus) {
            mPrivateFlags3 &= ~PFLAG3_NO_REVEAL_ON_FOCUS;
        } else {
            mPrivateFlags3 |= PFLAG3_NO_REVEAL_ON_FOCUS;
        }
    }
    /**
     * Returns this view's preference for reveal behavior when it gains focus.
     *
     * <p>When this method returns true for a child view requesting focus, ancestor
     * views responding to a focus change in {@link ViewParent#requestChildFocus(View, View)}
     * should make a best effort to make the newly focused child fully visible to the user.
     * When it returns false, ancestor views should preferably not disrupt scroll positioning or
     * other properties affecting visibility to the user as part of the focus change.</p>
     *
     * @return true if this view would prefer to become fully visible when it gains focus,
     *         false if it would prefer not to disrupt scroll positioning
     *
     * @see #setRevealOnFocusHint(boolean)
     */
    public final boolean getRevealOnFocusHint() {
        return (mPrivateFlags3 & PFLAG3_NO_REVEAL_ON_FOCUS) == 0;
    }
    /**
     * Populates <code>outRect</code> with the hotspot bounds. By default,
     * the hotspot bounds are identical to the screen bounds.