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

Commit a624433b authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by android-build-merger
Browse files

Merge "Remove autofillMode attribute" into oc-dev

am: a05f1fdd

Change-Id: Ib5a661b27a23e7dbaa277a3d3ea1d85a4ab7ba72
parents 5b0d7825 a05f1fdd
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ package android {
    ctor public R.attr();
    field public static final int __removed1 = 16844099; // 0x1010543
    field public static final int __removed2 = 16844104; // 0x1010548
    field public static final int __removed3 = 16844116; // 0x1010554
    field public static final int absListViewStyle = 16842858; // 0x101006a
    field public static final int accessibilityEventTypes = 16843648; // 0x1010380
    field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
@@ -313,7 +314,6 @@ package android {
    field public static final int autoUrlDetect = 16843404; // 0x101028c
    field public static final int autoVerify = 16844014; // 0x10104ee
    field public static final int autofillHints = 16844121; // 0x1010559
    field public static final int autofillMode = 16844116; // 0x1010554
    field public static final int background = 16842964; // 0x10100d4
    field public static final int backgroundDimAmount = 16842802; // 0x1010032
    field public static final int backgroundDimEnabled = 16843295; // 0x101021f
@@ -45373,7 +45373,6 @@ package android.view {
    method public android.view.animation.Animation getAnimation();
    method public android.os.IBinder getApplicationWindowToken();
    method public java.lang.String[] getAutofillHints();
    method public int getAutofillMode();
    method public int getAutofillType();
    method public android.view.autofill.AutofillValue getAutofillValue();
    method public android.graphics.drawable.Drawable getBackground();
@@ -45462,7 +45461,6 @@ package android.view {
    method public float getPivotX();
    method public float getPivotY();
    method public android.view.PointerIcon getPointerIcon();
    method public int getResolvedAutofillMode();
    method public android.content.res.Resources getResources();
    method public final boolean getRevealOnFocusHint();
    method public final int getRight();
@@ -45695,7 +45693,6 @@ package android.view {
    method public void setAlpha(float);
    method public void setAnimation(android.view.animation.Animation);
    method public void setAutofillHints(java.lang.String...);
    method public void setAutofillMode(int);
    method public void setBackground(android.graphics.drawable.Drawable);
    method public void setBackgroundColor(int);
    method public deprecated void setBackgroundDrawable(android.graphics.drawable.Drawable);
@@ -45851,9 +45848,6 @@ package android.view {
    field public static final java.lang.String AUTOFILL_HINT_POSTAL_ADDRESS = "postalAddress";
    field public static final java.lang.String AUTOFILL_HINT_POSTAL_CODE = "postalCode";
    field public static final java.lang.String AUTOFILL_HINT_USERNAME = "username";
    field public static final int AUTOFILL_MODE_AUTO = 1; // 0x1
    field public static final int AUTOFILL_MODE_INHERIT = 0; // 0x0
    field public static final int AUTOFILL_MODE_MANUAL = 2; // 0x2
    field public static final int AUTOFILL_TYPE_DATE = 4; // 0x4
    field public static final int AUTOFILL_TYPE_LIST = 3; // 0x3
    field public static final int AUTOFILL_TYPE_NONE = 0; // 0x0
@@ -46421,7 +46415,6 @@ package android.view {
    method public abstract int getLayoutDirection();
    method public abstract android.view.ViewParent getParent();
    method public abstract android.view.ViewParent getParentForAccessibility();
    method public default int getResolvedAutofillMode();
    method public abstract int getTextAlignment();
    method public abstract int getTextDirection();
    method public abstract deprecated void invalidateChild(android.view.View, android.graphics.Rect);
+1 −8
Original line number Diff line number Diff line
@@ -329,6 +329,7 @@ package android {
    ctor public R.attr();
    field public static final int __removed1 = 16844099; // 0x1010543
    field public static final int __removed2 = 16844104; // 0x1010548
    field public static final int __removed3 = 16844116; // 0x1010554
    field public static final int absListViewStyle = 16842858; // 0x101006a
    field public static final int accessibilityEventTypes = 16843648; // 0x1010380
    field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
@@ -431,7 +432,6 @@ package android {
    field public static final int autoUrlDetect = 16843404; // 0x101028c
    field public static final int autoVerify = 16844014; // 0x10104ee
    field public static final int autofillHints = 16844121; // 0x1010559
    field public static final int autofillMode = 16844116; // 0x1010554
    field public static final int background = 16842964; // 0x10100d4
    field public static final int backgroundDimAmount = 16842802; // 0x1010032
    field public static final int backgroundDimEnabled = 16843295; // 0x101021f
@@ -48954,7 +48954,6 @@ package android.view {
    method public android.view.animation.Animation getAnimation();
    method public android.os.IBinder getApplicationWindowToken();
    method public java.lang.String[] getAutofillHints();
    method public int getAutofillMode();
    method public int getAutofillType();
    method public android.view.autofill.AutofillValue getAutofillValue();
    method public android.graphics.drawable.Drawable getBackground();
@@ -49043,7 +49042,6 @@ package android.view {
    method public float getPivotX();
    method public float getPivotY();
    method public android.view.PointerIcon getPointerIcon();
    method public int getResolvedAutofillMode();
    method public android.content.res.Resources getResources();
    method public final boolean getRevealOnFocusHint();
    method public final int getRight();
@@ -49276,7 +49274,6 @@ package android.view {
    method public void setAlpha(float);
    method public void setAnimation(android.view.animation.Animation);
    method public void setAutofillHints(java.lang.String...);
    method public void setAutofillMode(int);
    method public void setBackground(android.graphics.drawable.Drawable);
    method public void setBackgroundColor(int);
    method public deprecated void setBackgroundDrawable(android.graphics.drawable.Drawable);
@@ -49432,9 +49429,6 @@ package android.view {
    field public static final java.lang.String AUTOFILL_HINT_POSTAL_ADDRESS = "postalAddress";
    field public static final java.lang.String AUTOFILL_HINT_POSTAL_CODE = "postalCode";
    field public static final java.lang.String AUTOFILL_HINT_USERNAME = "username";
    field public static final int AUTOFILL_MODE_AUTO = 1; // 0x1
    field public static final int AUTOFILL_MODE_INHERIT = 0; // 0x0
    field public static final int AUTOFILL_MODE_MANUAL = 2; // 0x2
    field public static final int AUTOFILL_TYPE_DATE = 4; // 0x4
    field public static final int AUTOFILL_TYPE_LIST = 3; // 0x3
    field public static final int AUTOFILL_TYPE_NONE = 0; // 0x0
@@ -50002,7 +49996,6 @@ package android.view {
    method public abstract int getLayoutDirection();
    method public abstract android.view.ViewParent getParent();
    method public abstract android.view.ViewParent getParentForAccessibility();
    method public default int getResolvedAutofillMode();
    method public abstract int getTextAlignment();
    method public abstract int getTextDirection();
    method public abstract deprecated void invalidateChild(android.view.View, android.graphics.Rect);
+1 −8
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ package android {
    ctor public R.attr();
    field public static final int __removed1 = 16844099; // 0x1010543
    field public static final int __removed2 = 16844104; // 0x1010548
    field public static final int __removed3 = 16844116; // 0x1010554
    field public static final int absListViewStyle = 16842858; // 0x101006a
    field public static final int accessibilityEventTypes = 16843648; // 0x1010380
    field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
@@ -313,7 +314,6 @@ package android {
    field public static final int autoUrlDetect = 16843404; // 0x101028c
    field public static final int autoVerify = 16844014; // 0x10104ee
    field public static final int autofillHints = 16844121; // 0x1010559
    field public static final int autofillMode = 16844116; // 0x1010554
    field public static final int background = 16842964; // 0x10100d4
    field public static final int backgroundDimAmount = 16842802; // 0x1010032
    field public static final int backgroundDimEnabled = 16843295; // 0x101021f
@@ -45755,7 +45755,6 @@ package android.view {
    method public android.view.animation.Animation getAnimation();
    method public android.os.IBinder getApplicationWindowToken();
    method public java.lang.String[] getAutofillHints();
    method public int getAutofillMode();
    method public int getAutofillType();
    method public android.view.autofill.AutofillValue getAutofillValue();
    method public android.graphics.drawable.Drawable getBackground();
@@ -45844,7 +45843,6 @@ package android.view {
    method public float getPivotX();
    method public float getPivotY();
    method public android.view.PointerIcon getPointerIcon();
    method public int getResolvedAutofillMode();
    method public android.content.res.Resources getResources();
    method public final boolean getRevealOnFocusHint();
    method public final int getRight();
@@ -46080,7 +46078,6 @@ package android.view {
    method public void setAlpha(float);
    method public void setAnimation(android.view.animation.Animation);
    method public void setAutofillHints(java.lang.String...);
    method public void setAutofillMode(int);
    method public void setAutofilled(boolean);
    method public void setBackground(android.graphics.drawable.Drawable);
    method public void setBackgroundColor(int);
@@ -46237,9 +46234,6 @@ package android.view {
    field public static final java.lang.String AUTOFILL_HINT_POSTAL_ADDRESS = "postalAddress";
    field public static final java.lang.String AUTOFILL_HINT_POSTAL_CODE = "postalCode";
    field public static final java.lang.String AUTOFILL_HINT_USERNAME = "username";
    field public static final int AUTOFILL_MODE_AUTO = 1; // 0x1
    field public static final int AUTOFILL_MODE_INHERIT = 0; // 0x0
    field public static final int AUTOFILL_MODE_MANUAL = 2; // 0x2
    field public static final int AUTOFILL_TYPE_DATE = 4; // 0x4
    field public static final int AUTOFILL_TYPE_LIST = 3; // 0x3
    field public static final int AUTOFILL_TYPE_NONE = 0; // 0x0
@@ -46811,7 +46805,6 @@ package android.view {
    method public abstract int getLayoutDirection();
    method public abstract android.view.ViewParent getParent();
    method public abstract android.view.ViewParent getParentForAccessibility();
    method public default int getResolvedAutofillMode();
    method public abstract int getTextAlignment();
    method public abstract int getTextDirection();
    method public abstract deprecated void invalidateChild(android.view.View, android.graphics.Rect);
+2 −118
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ import android.widget.FrameLayout;
import android.widget.ScrollBarDrawable;
import com.android.internal.R;
import com.android.internal.util.Preconditions;
import com.android.internal.view.TooltipPopup;
import com.android.internal.view.menu.MenuBuilder;
import com.android.internal.widget.ScrollBarUtils;
@@ -954,41 +953,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    private static final int[] VISIBILITY_FLAGS = {VISIBLE, INVISIBLE, GONE};
    /** @hide */
    @IntDef({
            AUTOFILL_MODE_INHERIT,
            AUTOFILL_MODE_AUTO,
            AUTOFILL_MODE_MANUAL
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface AutofillMode {}
    /**
     * This view inherits the autofill state from it's parent. If there is no parent it is
     * {@link #AUTOFILL_MODE_AUTO}.
     * Use with {@link #setAutofillMode(int)} and <a href="#attr_android:autofillMode">
     * {@code android:autofillMode}.
     */
    public static final int AUTOFILL_MODE_INHERIT = 0;
    /**
     * Allows this view to automatically trigger an autofill request when it get focus.
     * Use with {@link #setAutofillMode(int)} and <a href="#attr_android:autofillMode">
     * {@code android:autofillMode}.
     */
    public static final int AUTOFILL_MODE_AUTO = 1;
    /**
     * Do not trigger an autofill request if this view is focused. The user can still force
     * an autofill request.
     * <p>This does not prevent this field from being autofilled if an autofill operation is
     * triggered from a different view.</p>
     *
     * Use with {@link #setAutofillMode(int)} and <a href="#attr_android:autofillMode">{@code
     * android:autofillMode}.
     */
    public static final int AUTOFILL_MODE_MANUAL = 2;
    /**
     * This view contains an email address.
     *
@@ -2762,7 +2726,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *                 1                 PFLAG3_IS_AUTOFILLED
     *                1                  PFLAG3_FINGER_DOWN
     *               1                   PFLAG3_FOCUSED_BY_DEFAULT
     *             11                    PFLAG3_AUTO_FILL_MODE_MASK
     *             __                    unused
     *           11                      PFLAG3_IMPORTANT_FOR_AUTOFILL
     *          1                        PFLAG3_OVERLAPPING_RENDERING_FORCED_VALUE
     *         1                         PFLAG3_HAS_OVERLAPPING_RENDERING_FORCED
@@ -2991,23 +2955,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    private static final int PFLAG3_FOCUSED_BY_DEFAULT = 0x40000;
    /**
     * Shift for the place where the autofill mode is stored in the pflags
     *
     * @see #getAutofillMode()
     * @see #setAutofillMode(int)
     */
    private static final int PFLAG3_AUTOFILL_MODE_SHIFT = 19;
    /**
     * Mask for autofill modes
     *
     * @see #getAutofillMode()
     * @see #setAutofillMode(int)
     */
    private static final int PFLAG3_AUTOFILL_MODE_MASK = (AUTOFILL_MODE_INHERIT
            | AUTOFILL_MODE_AUTO | AUTOFILL_MODE_MANUAL) << PFLAG3_AUTOFILL_MODE_SHIFT;
    /**
     * Shift for the bits in {@link #mPrivateFlags3} related to the
     * "importantForAutofill" attribute.
@@ -5055,11 +5002,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                        setFocusedByDefault(a.getBoolean(attr, true));
                    }
                    break;
                case R.styleable.View_autofillMode:
                    if (a.peekValue(attr) != null) {
                        setAutofillMode(a.getInt(attr, AUTOFILL_MODE_INHERIT));
                    }
                    break;
                case R.styleable.View_autofillHints:
                    if (a.peekValue(attr) != null) {
                        CharSequence[] rawHints = null;
@@ -6849,8 +6791,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    private void notifyEnterOrExitForAutoFillIfNeeded(boolean enter) {
        if (isAutofillable() && isAttachedToWindow()
                && getResolvedAutofillMode() == AUTOFILL_MODE_AUTO) {
        if (isAutofillable() && isAttachedToWindow()) {
            AutofillManager afm = getAutofillManager();
            if (afm != null) {
                if (enter && hasWindowFocus() && isFocused()) {
@@ -9158,21 +9099,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
    }
    /**
     * Set autofill mode for the view.
     *
     * @param autofillMode One of {@link #AUTOFILL_MODE_INHERIT}, {@link #AUTOFILL_MODE_AUTO},
     *                     or {@link #AUTOFILL_MODE_MANUAL}.
     * @attr ref android.R.styleable#View_autofillMode
     */
    public void setAutofillMode(@AutofillMode int autofillMode) {
        Preconditions.checkArgumentInRange(autofillMode, AUTOFILL_MODE_INHERIT,
                AUTOFILL_MODE_MANUAL, "autofillMode");
        mPrivateFlags3 &= ~PFLAG3_AUTOFILL_MODE_MASK;
        mPrivateFlags3 |= autofillMode << PFLAG3_AUTOFILL_MODE_SHIFT;
    }
    /**
     * Sets the hints that helps the autofill service to select the appropriate data to fill the
     * view.
@@ -9809,48 +9735,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        return FOCUSABLE_IN_TOUCH_MODE == (mViewFlags & FOCUSABLE_IN_TOUCH_MODE);
    }
    /**
     * Returns the autofill mode for this view.
     *
     * @return One of {@link #AUTOFILL_MODE_INHERIT}, {@link #AUTOFILL_MODE_AUTO}, or
     * {@link #AUTOFILL_MODE_MANUAL}.
     * @attr ref android.R.styleable#View_autofillMode
     */
    @ViewDebug.ExportedProperty(mapping = {
            @ViewDebug.IntToString(from = AUTOFILL_MODE_INHERIT, to = "AUTOFILL_MODE_INHERIT"),
            @ViewDebug.IntToString(from = AUTOFILL_MODE_AUTO, to = "AUTOFILL_MODE_AUTO"),
            @ViewDebug.IntToString(from = AUTOFILL_MODE_MANUAL, to = "AUTOFILL_MODE_MANUAL")
            })
    @AutofillMode
    public int getAutofillMode() {
        return (mPrivateFlags3 & PFLAG3_AUTOFILL_MODE_MASK) >> PFLAG3_AUTOFILL_MODE_SHIFT;
    }
    /**
     * Returns the resolved autofill mode for this view.
     *
     * This is the same as {@link #getAutofillMode()} but if the mode is
     * {@link #AUTOFILL_MODE_INHERIT} the parents autofill mode will be returned.
     *
     * @return One of {@link #AUTOFILL_MODE_AUTO}, or {@link #AUTOFILL_MODE_MANUAL}. If the auto-
     *         fill mode can not be resolved e.g. {@link #getAutofillMode()} is
     *         {@link #AUTOFILL_MODE_INHERIT} and the {@link View} is detached
     *         {@link #AUTOFILL_MODE_AUTO} is returned.
     */
    public @AutofillMode int getResolvedAutofillMode() {
        @AutofillMode int autofillMode = getAutofillMode();
        if (autofillMode == AUTOFILL_MODE_INHERIT) {
            if (mParent == null) {
                return AUTOFILL_MODE_AUTO;
            } else {
                return mParent.getResolvedAutofillMode();
            }
        } else {
            return autofillMode;
        }
    }
    /**
     * Find the nearest view in the specified direction that can take focus.
     * This does not actually give focus to that view.
+0 −13
Original line number Diff line number Diff line
@@ -659,17 +659,4 @@ public interface ViewParent {
     * @return true if the action was consumed by this ViewParent
     */
    public boolean onNestedPrePerformAccessibilityAction(View target, int action, Bundle arguments);

    /**
     * Return the resolved autofill mode.
     *
     * @return One of {@link View#AUTOFILL_MODE_AUTO}, {@link View#AUTOFILL_MODE_MANUAL} if the
     *         autofill mode can be resolved. If the autofill mode cannot be resolved
     *         {@link View#AUTOFILL_MODE_AUTO}.
     *
     * @see View#getResolvedAutofillMode()
     */
    default @View.AutofillMode int getResolvedAutofillMode() {
        return View.AUTOFILL_MODE_AUTO;
    }
}
Loading