Loading api/current.txt +20 −2 Original line number Diff line number Diff line Loading @@ -298,6 +298,7 @@ package android { field public static final int authorities = 16842776; // 0x1010018 field public static final int autoAdvanceViewId = 16843535; // 0x101030f field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b field public static final int autoFillHint = 16844121; // 0x1010559 field public static final int autoFillMode = 16844116; // 0x1010554 field public static final int autoLink = 16842928; // 0x10100b0 field public static final int autoMirrored = 16843754; // 0x10103ea Loading Loading @@ -6556,6 +6557,7 @@ package android.app.assist { public static class AssistStructure.ViewNode { method public float getAlpha(); method public int getAutoFillHint(); method public android.view.autofill.AutoFillId getAutoFillId(); method public java.lang.String[] getAutoFillOptions(); method public android.view.autofill.AutoFillType getAutoFillType(); Loading Loading @@ -44825,6 +44827,7 @@ package android.view { method public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method public int getAutoFillHint(); method public int getAutoFillMode(); method public android.view.autofill.AutoFillType getAutoFillType(); method public android.view.autofill.AutoFillValue getAutoFillValue(); Loading Loading @@ -45142,6 +45145,7 @@ package android.view { method public void setActivated(boolean); method public void setAlpha(float); method public void setAnimation(android.view.animation.Animation); method public void setAutoFillHint(int); method public void setAutoFillMode(int); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); Loading Loading @@ -45283,6 +45287,20 @@ package android.view { field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0 field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1 field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA; field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 512; // 0x200 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 4096; // 0x1000 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 1024; // 0x400 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 2048; // 0x800 field public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 128; // 0x80 field public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 256; // 0x100 field public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 1; // 0x1 field public static final int AUTO_FILL_HINT_NAME = 2; // 0x2 field public static final int AUTO_FILL_HINT_NONE = 0; // 0x0 field public static final int AUTO_FILL_HINT_PASSWORD = 8; // 0x8 field public static final int AUTO_FILL_HINT_PHONE = 16; // 0x10 field public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 32; // 0x20 field public static final int AUTO_FILL_HINT_POSTAL_CODE = 64; // 0x40 field public static final int AUTO_FILL_HINT_USERNAME = 4; // 0x4 field public static final int AUTO_FILL_MODE_AUTO = 1; // 0x1 field public static final int AUTO_FILL_MODE_INHERIT = 0; // 0x0 field public static final int AUTO_FILL_MODE_MANUAL = 2; // 0x2 Loading Loading @@ -45935,6 +45953,7 @@ package android.view { method public abstract void setAccessibilityFocused(boolean); method public abstract void setActivated(boolean); method public abstract void setAlpha(float); method public abstract void setAutoFillHint(int); method public abstract void setAutoFillOptions(java.lang.String[]); method public abstract void setAutoFillType(android.view.autofill.AutoFillType); method public abstract void setAutoFillValue(android.view.autofill.AutoFillValue); Loading Loading @@ -47206,9 +47225,8 @@ package android.view.autofill { method public int describeContents(); method public static android.view.autofill.AutoFillType forDate(); method public static android.view.autofill.AutoFillType forList(); method public static android.view.autofill.AutoFillType forText(int); method public static android.view.autofill.AutoFillType forText(); method public static android.view.autofill.AutoFillType forToggle(); method public int getSubType(); method public boolean isDate(); method public boolean isList(); method public boolean isText(); api/system-current.txt +20 −2 Original line number Diff line number Diff line Loading @@ -410,6 +410,7 @@ package android { field public static final int authorities = 16842776; // 0x1010018 field public static final int autoAdvanceViewId = 16843535; // 0x101030f field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b field public static final int autoFillHint = 16844121; // 0x1010559 field public static final int autoFillMode = 16844116; // 0x1010554 field public static final int autoLink = 16842928; // 0x10100b0 field public static final int autoMirrored = 16843754; // 0x10103ea Loading Loading @@ -6795,6 +6796,7 @@ package android.app.assist { public static class AssistStructure.ViewNode { method public float getAlpha(); method public int getAutoFillHint(); method public android.view.autofill.AutoFillId getAutoFillId(); method public java.lang.String[] getAutoFillOptions(); method public android.view.autofill.AutoFillType getAutoFillType(); Loading Loading @@ -48211,6 +48213,7 @@ package android.view { method public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method public int getAutoFillHint(); method public int getAutoFillMode(); method public android.view.autofill.AutoFillType getAutoFillType(); method public android.view.autofill.AutoFillValue getAutoFillValue(); Loading Loading @@ -48528,6 +48531,7 @@ package android.view { method public void setActivated(boolean); method public void setAlpha(float); method public void setAnimation(android.view.animation.Animation); method public void setAutoFillHint(int); method public void setAutoFillMode(int); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); Loading Loading @@ -48669,6 +48673,20 @@ package android.view { field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0 field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1 field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA; field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 512; // 0x200 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 4096; // 0x1000 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 1024; // 0x400 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 2048; // 0x800 field public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 128; // 0x80 field public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 256; // 0x100 field public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 1; // 0x1 field public static final int AUTO_FILL_HINT_NAME = 2; // 0x2 field public static final int AUTO_FILL_HINT_NONE = 0; // 0x0 field public static final int AUTO_FILL_HINT_PASSWORD = 8; // 0x8 field public static final int AUTO_FILL_HINT_PHONE = 16; // 0x10 field public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 32; // 0x20 field public static final int AUTO_FILL_HINT_POSTAL_CODE = 64; // 0x40 field public static final int AUTO_FILL_HINT_USERNAME = 4; // 0x4 field public static final int AUTO_FILL_MODE_AUTO = 1; // 0x1 field public static final int AUTO_FILL_MODE_INHERIT = 0; // 0x0 field public static final int AUTO_FILL_MODE_MANUAL = 2; // 0x2 Loading Loading @@ -49321,6 +49339,7 @@ package android.view { method public abstract void setAccessibilityFocused(boolean); method public abstract void setActivated(boolean); method public abstract void setAlpha(float); method public abstract void setAutoFillHint(int); method public abstract void setAutoFillOptions(java.lang.String[]); method public abstract void setAutoFillType(android.view.autofill.AutoFillType); method public abstract void setAutoFillValue(android.view.autofill.AutoFillValue); Loading Loading @@ -50595,9 +50614,8 @@ package android.view.autofill { method public int describeContents(); method public static android.view.autofill.AutoFillType forDate(); method public static android.view.autofill.AutoFillType forList(); method public static android.view.autofill.AutoFillType forText(int); method public static android.view.autofill.AutoFillType forText(); method public static android.view.autofill.AutoFillType forToggle(); method public int getSubType(); method public boolean isDate(); method public boolean isList(); method public boolean isText(); api/test-current.txt +20 −2 Original line number Diff line number Diff line Loading @@ -298,6 +298,7 @@ package android { field public static final int authorities = 16842776; // 0x1010018 field public static final int autoAdvanceViewId = 16843535; // 0x101030f field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b field public static final int autoFillHint = 16844121; // 0x1010559 field public static final int autoFillMode = 16844116; // 0x1010554 field public static final int autoLink = 16842928; // 0x10100b0 field public static final int autoMirrored = 16843754; // 0x10103ea Loading Loading @@ -6583,6 +6584,7 @@ package android.app.assist { public static class AssistStructure.ViewNode { method public float getAlpha(); method public int getAutoFillHint(); method public android.view.autofill.AutoFillId getAutoFillId(); method public java.lang.String[] getAutoFillOptions(); method public android.view.autofill.AutoFillType getAutoFillType(); Loading Loading @@ -45181,6 +45183,7 @@ package android.view { method public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method public int getAutoFillHint(); method public int getAutoFillMode(); method public android.view.autofill.AutoFillType getAutoFillType(); method public android.view.autofill.AutoFillValue getAutoFillValue(); Loading Loading @@ -45501,6 +45504,7 @@ package android.view { method public void setActivated(boolean); method public void setAlpha(float); method public void setAnimation(android.view.animation.Animation); method public void setAutoFillHint(int); method public void setAutoFillMode(int); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); Loading Loading @@ -45642,6 +45646,20 @@ package android.view { field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0 field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1 field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA; field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 512; // 0x200 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 4096; // 0x1000 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 1024; // 0x400 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 2048; // 0x800 field public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 128; // 0x80 field public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 256; // 0x100 field public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 1; // 0x1 field public static final int AUTO_FILL_HINT_NAME = 2; // 0x2 field public static final int AUTO_FILL_HINT_NONE = 0; // 0x0 field public static final int AUTO_FILL_HINT_PASSWORD = 8; // 0x8 field public static final int AUTO_FILL_HINT_PHONE = 16; // 0x10 field public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 32; // 0x20 field public static final int AUTO_FILL_HINT_POSTAL_CODE = 64; // 0x40 field public static final int AUTO_FILL_HINT_USERNAME = 4; // 0x4 field public static final int AUTO_FILL_MODE_AUTO = 1; // 0x1 field public static final int AUTO_FILL_MODE_INHERIT = 0; // 0x0 field public static final int AUTO_FILL_MODE_MANUAL = 2; // 0x2 Loading Loading @@ -46298,6 +46316,7 @@ package android.view { method public abstract void setAccessibilityFocused(boolean); method public abstract void setActivated(boolean); method public abstract void setAlpha(float); method public abstract void setAutoFillHint(int); method public abstract void setAutoFillOptions(java.lang.String[]); method public abstract void setAutoFillType(android.view.autofill.AutoFillType); method public abstract void setAutoFillValue(android.view.autofill.AutoFillValue); Loading Loading @@ -47571,9 +47590,8 @@ package android.view.autofill { method public int describeContents(); method public static android.view.autofill.AutoFillType forDate(); method public static android.view.autofill.AutoFillType forList(); method public static android.view.autofill.AutoFillType forText(int); method public static android.view.autofill.AutoFillType forText(); method public static android.view.autofill.AutoFillType forToggle(); method public int getSubType(); method public boolean isDate(); method public boolean isList(); method public boolean isText(); core/java/android/app/assist/AssistStructure.java +23 −0 Original line number Diff line number Diff line Loading @@ -539,6 +539,7 @@ public class AssistStructure implements Parcelable { // fields (viewId and childId) of the field. AutoFillId mAutoFillId; AutoFillType mAutoFillType; @View.AutoFillHint int mAutoFillHint; AutoFillValue mAutoFillValue; String[] mAutoFillOptions; boolean mSanitized; Loading Loading @@ -623,6 +624,7 @@ public class AssistStructure implements Parcelable { mSanitized = in.readInt() == 1; mAutoFillId = in.readParcelable(null); mAutoFillType = in.readParcelable(null); mAutoFillHint = in.readInt(); mAutoFillValue = in.readParcelable(null); mAutoFillOptions = in.readStringArray(); } Loading Loading @@ -756,6 +758,7 @@ public class AssistStructure implements Parcelable { out.writeInt(mSanitized ? 1 : 0); out.writeParcelable(mAutoFillId, 0); out.writeParcelable(mAutoFillType, 0); out.writeInt(mAutoFillHint); final AutoFillValue sanitizedValue = writeSensitive ? mAutoFillValue : null; out.writeParcelable(sanitizedValue, 0); out.writeStringArray(mAutoFillOptions); Loading Loading @@ -858,6 +861,20 @@ public class AssistStructure implements Parcelable { return mAutoFillType; } /** * Describes the content of a view so that a auto-fill service can fill in the appropriate * data. * * <p>It's only set when the {@link AssistStructure} is used for auto-filling purposes, not * for assist.</p> * * @return The hint for this view */ // TODO(b/35364993): add CTS/unit test @View.AutoFillHint public int getAutoFillHint() { return mAutoFillHint; } /** * Gets the the value of this view. * Loading Loading @@ -1548,6 +1565,11 @@ public class AssistStructure implements Parcelable { mNode.mAutoFillType = type; } @Override public void setAutoFillHint(@View.AutoFillHint int hint) { mNode.mAutoFillHint = hint; } @Override public void setAutoFillValue(AutoFillValue value) { mNode.mAutoFillValue = value; Loading Loading @@ -1695,6 +1717,7 @@ public class AssistStructure implements Parcelable { + ", type=" + node.getAutoFillType() + ", options=" + Arrays.toString(node.getAutoFillOptions()) + ", inputType=" + node.getInputType() + ", hint=" + Integer.toHexString(node.getAutoFillHint()) + ", value=" + node.getAutoFillValue() + ", sanitized=" + node.isSanitized()); } Loading core/java/android/view/View.java +169 −3 Original line number Diff line number Diff line Loading @@ -974,6 +974,143 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ public static final int AUTO_FILL_MODE_MANUAL = 2; /** @hide */ @IntDef({ AUTO_FILL_HINT_NONE, AUTO_FILL_HINT_EMAIL_ADDRESS, AUTO_FILL_HINT_NAME, AUTO_FILL_HINT_POSTAL_ADDRESS, AUTO_FILL_HINT_PASSWORD, AUTO_FILL_HINT_PHONE, AUTO_FILL_HINT_USERNAME, AUTO_FILL_HINT_POSTAL_CODE, AUTO_FILL_HINT_CREDIT_CARD_NUMBER, AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY, }) @Retention(RetentionPolicy.SOURCE) public @interface AutoFillHint {} /** * No auto-fill hint is set. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_NONE = 0; /** * This view contains an email address. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 0x1; /** * The view contains a real name. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_NAME = 0x2; /** * The view contains a user name. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_USERNAME = 0x4; /** * The view contains a password. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_PASSWORD = 0x8; /** * The view contains a phone number. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_PHONE = 0x10; /** * The view contains a postal address. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 0x20; /** * The view contains a postal code. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_POSTAL_CODE = 0x40; /** * The view contains a credit card number. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 0x80; /** * The view contains a credit card security code. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 0x100; /** * The view contains a credit card expiration date. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 0x200; /** * The view contains the month a credit card expires. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 0x400; /** * The view contains the year a credit card expires. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 0x800; /** * The view contains the day a credit card expires. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 0x1000; /** * Hint for the auto-fill services that describes the content of the view. */ @AutoFillHint private int mAutoFillHint; /** * This view is enabled. Interpretation varies by subclass. * Use with ENABLED_MASK when calling setFlags. Loading Loading @@ -4799,11 +4936,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback, setFocusedByDefault(a.getBoolean(attr, true)); } break; case com.android.internal.R.styleable.View_autoFillMode: case R.styleable.View_autoFillMode: if (a.peekValue(attr) != null) { setAutoFillMode(a.getInt(attr, AUTO_FILL_MODE_INHERIT)); } break; case R.styleable.View_autoFillHint: if (a.peekValue(attr) != null) { setAutoFillHint(a.getInt(attr, AUTO_FILL_HINT_NONE)); } break; } } Loading Loading @@ -7035,6 +7177,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // to reuse the accessibility id to save space. structure.setAutoFillId(getAccessibilityViewId()); structure.setAutoFillType(autoFillType); structure.setAutoFillHint(getAutoFillHint()); structure.setAutoFillValue(getAutoFillValue()); } } Loading Loading @@ -7178,7 +7321,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Describes the auto-fill type that should be used on calls to * {@link #autoFill(AutoFillValue)} and {@link #autoFillVirtual(int, AutoFillValue)}. * * <p>By default returns {@code null}, but views should override it (and * {@link #autoFill(AutoFillValue)} to support the AutoFill Framework. */ Loading @@ -7187,10 +7330,22 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return null; } /** * Describes the content of a view so that a auto-fill service can fill in the appropriate data. * * @return The hint set via the attribute * * @attr ref android.R.styleable#View_autoFillHint */ @ViewDebug.ExportedProperty() @AutoFillHint public int getAutoFillHint() { return mAutoFillHint; } /** * Gets the {@link View}'s current auto-fill value. * * <p>By default returns {@code null}, but views should override it, * <p>By default returns {@code null}, but views should override it (and * {@link #autoFill(AutoFillValue)}, and {@link #getAutoFillType()} to support the AutoFill * Framework. */ Loading Loading @@ -8697,6 +8852,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mPrivateFlags3 |= autoFillMode << PFLAG3_AUTO_FILL_MODE_SHIFT; } /** * Sets the a hint that helps the auto-fill service to select the appropriate data to fill the * view. * * @param autoFillHint The auto-fill hint to set * @attr ref android.R.styleable#View_autoFillHint */ public void setAutoFillHint(@AutoFillHint int autoFillHint) { mAutoFillHint = autoFillHint; } /** * Set whether this view should have sound effects enabled for events such as * clicking and touching. Loading Loading
api/current.txt +20 −2 Original line number Diff line number Diff line Loading @@ -298,6 +298,7 @@ package android { field public static final int authorities = 16842776; // 0x1010018 field public static final int autoAdvanceViewId = 16843535; // 0x101030f field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b field public static final int autoFillHint = 16844121; // 0x1010559 field public static final int autoFillMode = 16844116; // 0x1010554 field public static final int autoLink = 16842928; // 0x10100b0 field public static final int autoMirrored = 16843754; // 0x10103ea Loading Loading @@ -6556,6 +6557,7 @@ package android.app.assist { public static class AssistStructure.ViewNode { method public float getAlpha(); method public int getAutoFillHint(); method public android.view.autofill.AutoFillId getAutoFillId(); method public java.lang.String[] getAutoFillOptions(); method public android.view.autofill.AutoFillType getAutoFillType(); Loading Loading @@ -44825,6 +44827,7 @@ package android.view { method public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method public int getAutoFillHint(); method public int getAutoFillMode(); method public android.view.autofill.AutoFillType getAutoFillType(); method public android.view.autofill.AutoFillValue getAutoFillValue(); Loading Loading @@ -45142,6 +45145,7 @@ package android.view { method public void setActivated(boolean); method public void setAlpha(float); method public void setAnimation(android.view.animation.Animation); method public void setAutoFillHint(int); method public void setAutoFillMode(int); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); Loading Loading @@ -45283,6 +45287,20 @@ package android.view { field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0 field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1 field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA; field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 512; // 0x200 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 4096; // 0x1000 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 1024; // 0x400 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 2048; // 0x800 field public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 128; // 0x80 field public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 256; // 0x100 field public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 1; // 0x1 field public static final int AUTO_FILL_HINT_NAME = 2; // 0x2 field public static final int AUTO_FILL_HINT_NONE = 0; // 0x0 field public static final int AUTO_FILL_HINT_PASSWORD = 8; // 0x8 field public static final int AUTO_FILL_HINT_PHONE = 16; // 0x10 field public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 32; // 0x20 field public static final int AUTO_FILL_HINT_POSTAL_CODE = 64; // 0x40 field public static final int AUTO_FILL_HINT_USERNAME = 4; // 0x4 field public static final int AUTO_FILL_MODE_AUTO = 1; // 0x1 field public static final int AUTO_FILL_MODE_INHERIT = 0; // 0x0 field public static final int AUTO_FILL_MODE_MANUAL = 2; // 0x2 Loading Loading @@ -45935,6 +45953,7 @@ package android.view { method public abstract void setAccessibilityFocused(boolean); method public abstract void setActivated(boolean); method public abstract void setAlpha(float); method public abstract void setAutoFillHint(int); method public abstract void setAutoFillOptions(java.lang.String[]); method public abstract void setAutoFillType(android.view.autofill.AutoFillType); method public abstract void setAutoFillValue(android.view.autofill.AutoFillValue); Loading Loading @@ -47206,9 +47225,8 @@ package android.view.autofill { method public int describeContents(); method public static android.view.autofill.AutoFillType forDate(); method public static android.view.autofill.AutoFillType forList(); method public static android.view.autofill.AutoFillType forText(int); method public static android.view.autofill.AutoFillType forText(); method public static android.view.autofill.AutoFillType forToggle(); method public int getSubType(); method public boolean isDate(); method public boolean isList(); method public boolean isText();
api/system-current.txt +20 −2 Original line number Diff line number Diff line Loading @@ -410,6 +410,7 @@ package android { field public static final int authorities = 16842776; // 0x1010018 field public static final int autoAdvanceViewId = 16843535; // 0x101030f field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b field public static final int autoFillHint = 16844121; // 0x1010559 field public static final int autoFillMode = 16844116; // 0x1010554 field public static final int autoLink = 16842928; // 0x10100b0 field public static final int autoMirrored = 16843754; // 0x10103ea Loading Loading @@ -6795,6 +6796,7 @@ package android.app.assist { public static class AssistStructure.ViewNode { method public float getAlpha(); method public int getAutoFillHint(); method public android.view.autofill.AutoFillId getAutoFillId(); method public java.lang.String[] getAutoFillOptions(); method public android.view.autofill.AutoFillType getAutoFillType(); Loading Loading @@ -48211,6 +48213,7 @@ package android.view { method public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method public int getAutoFillHint(); method public int getAutoFillMode(); method public android.view.autofill.AutoFillType getAutoFillType(); method public android.view.autofill.AutoFillValue getAutoFillValue(); Loading Loading @@ -48528,6 +48531,7 @@ package android.view { method public void setActivated(boolean); method public void setAlpha(float); method public void setAnimation(android.view.animation.Animation); method public void setAutoFillHint(int); method public void setAutoFillMode(int); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); Loading Loading @@ -48669,6 +48673,20 @@ package android.view { field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0 field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1 field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA; field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 512; // 0x200 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 4096; // 0x1000 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 1024; // 0x400 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 2048; // 0x800 field public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 128; // 0x80 field public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 256; // 0x100 field public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 1; // 0x1 field public static final int AUTO_FILL_HINT_NAME = 2; // 0x2 field public static final int AUTO_FILL_HINT_NONE = 0; // 0x0 field public static final int AUTO_FILL_HINT_PASSWORD = 8; // 0x8 field public static final int AUTO_FILL_HINT_PHONE = 16; // 0x10 field public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 32; // 0x20 field public static final int AUTO_FILL_HINT_POSTAL_CODE = 64; // 0x40 field public static final int AUTO_FILL_HINT_USERNAME = 4; // 0x4 field public static final int AUTO_FILL_MODE_AUTO = 1; // 0x1 field public static final int AUTO_FILL_MODE_INHERIT = 0; // 0x0 field public static final int AUTO_FILL_MODE_MANUAL = 2; // 0x2 Loading Loading @@ -49321,6 +49339,7 @@ package android.view { method public abstract void setAccessibilityFocused(boolean); method public abstract void setActivated(boolean); method public abstract void setAlpha(float); method public abstract void setAutoFillHint(int); method public abstract void setAutoFillOptions(java.lang.String[]); method public abstract void setAutoFillType(android.view.autofill.AutoFillType); method public abstract void setAutoFillValue(android.view.autofill.AutoFillValue); Loading Loading @@ -50595,9 +50614,8 @@ package android.view.autofill { method public int describeContents(); method public static android.view.autofill.AutoFillType forDate(); method public static android.view.autofill.AutoFillType forList(); method public static android.view.autofill.AutoFillType forText(int); method public static android.view.autofill.AutoFillType forText(); method public static android.view.autofill.AutoFillType forToggle(); method public int getSubType(); method public boolean isDate(); method public boolean isList(); method public boolean isText();
api/test-current.txt +20 −2 Original line number Diff line number Diff line Loading @@ -298,6 +298,7 @@ package android { field public static final int authorities = 16842776; // 0x1010018 field public static final int autoAdvanceViewId = 16843535; // 0x101030f field public static final int autoCompleteTextViewStyle = 16842859; // 0x101006b field public static final int autoFillHint = 16844121; // 0x1010559 field public static final int autoFillMode = 16844116; // 0x1010554 field public static final int autoLink = 16842928; // 0x10100b0 field public static final int autoMirrored = 16843754; // 0x10103ea Loading Loading @@ -6583,6 +6584,7 @@ package android.app.assist { public static class AssistStructure.ViewNode { method public float getAlpha(); method public int getAutoFillHint(); method public android.view.autofill.AutoFillId getAutoFillId(); method public java.lang.String[] getAutoFillOptions(); method public android.view.autofill.AutoFillType getAutoFillType(); Loading Loading @@ -45181,6 +45183,7 @@ package android.view { method public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method public int getAutoFillHint(); method public int getAutoFillMode(); method public android.view.autofill.AutoFillType getAutoFillType(); method public android.view.autofill.AutoFillValue getAutoFillValue(); Loading Loading @@ -45501,6 +45504,7 @@ package android.view { method public void setActivated(boolean); method public void setAlpha(float); method public void setAnimation(android.view.animation.Animation); method public void setAutoFillHint(int); method public void setAutoFillMode(int); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); Loading Loading @@ -45642,6 +45646,20 @@ package android.view { field public static final int ACCESSIBILITY_LIVE_REGION_NONE = 0; // 0x0 field public static final int ACCESSIBILITY_LIVE_REGION_POLITE = 1; // 0x1 field public static final android.util.Property<android.view.View, java.lang.Float> ALPHA; field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 512; // 0x200 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 4096; // 0x1000 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 1024; // 0x400 field public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 2048; // 0x800 field public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 128; // 0x80 field public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 256; // 0x100 field public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 1; // 0x1 field public static final int AUTO_FILL_HINT_NAME = 2; // 0x2 field public static final int AUTO_FILL_HINT_NONE = 0; // 0x0 field public static final int AUTO_FILL_HINT_PASSWORD = 8; // 0x8 field public static final int AUTO_FILL_HINT_PHONE = 16; // 0x10 field public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 32; // 0x20 field public static final int AUTO_FILL_HINT_POSTAL_CODE = 64; // 0x40 field public static final int AUTO_FILL_HINT_USERNAME = 4; // 0x4 field public static final int AUTO_FILL_MODE_AUTO = 1; // 0x1 field public static final int AUTO_FILL_MODE_INHERIT = 0; // 0x0 field public static final int AUTO_FILL_MODE_MANUAL = 2; // 0x2 Loading Loading @@ -46298,6 +46316,7 @@ package android.view { method public abstract void setAccessibilityFocused(boolean); method public abstract void setActivated(boolean); method public abstract void setAlpha(float); method public abstract void setAutoFillHint(int); method public abstract void setAutoFillOptions(java.lang.String[]); method public abstract void setAutoFillType(android.view.autofill.AutoFillType); method public abstract void setAutoFillValue(android.view.autofill.AutoFillValue); Loading Loading @@ -47571,9 +47590,8 @@ package android.view.autofill { method public int describeContents(); method public static android.view.autofill.AutoFillType forDate(); method public static android.view.autofill.AutoFillType forList(); method public static android.view.autofill.AutoFillType forText(int); method public static android.view.autofill.AutoFillType forText(); method public static android.view.autofill.AutoFillType forToggle(); method public int getSubType(); method public boolean isDate(); method public boolean isList(); method public boolean isText();
core/java/android/app/assist/AssistStructure.java +23 −0 Original line number Diff line number Diff line Loading @@ -539,6 +539,7 @@ public class AssistStructure implements Parcelable { // fields (viewId and childId) of the field. AutoFillId mAutoFillId; AutoFillType mAutoFillType; @View.AutoFillHint int mAutoFillHint; AutoFillValue mAutoFillValue; String[] mAutoFillOptions; boolean mSanitized; Loading Loading @@ -623,6 +624,7 @@ public class AssistStructure implements Parcelable { mSanitized = in.readInt() == 1; mAutoFillId = in.readParcelable(null); mAutoFillType = in.readParcelable(null); mAutoFillHint = in.readInt(); mAutoFillValue = in.readParcelable(null); mAutoFillOptions = in.readStringArray(); } Loading Loading @@ -756,6 +758,7 @@ public class AssistStructure implements Parcelable { out.writeInt(mSanitized ? 1 : 0); out.writeParcelable(mAutoFillId, 0); out.writeParcelable(mAutoFillType, 0); out.writeInt(mAutoFillHint); final AutoFillValue sanitizedValue = writeSensitive ? mAutoFillValue : null; out.writeParcelable(sanitizedValue, 0); out.writeStringArray(mAutoFillOptions); Loading Loading @@ -858,6 +861,20 @@ public class AssistStructure implements Parcelable { return mAutoFillType; } /** * Describes the content of a view so that a auto-fill service can fill in the appropriate * data. * * <p>It's only set when the {@link AssistStructure} is used for auto-filling purposes, not * for assist.</p> * * @return The hint for this view */ // TODO(b/35364993): add CTS/unit test @View.AutoFillHint public int getAutoFillHint() { return mAutoFillHint; } /** * Gets the the value of this view. * Loading Loading @@ -1548,6 +1565,11 @@ public class AssistStructure implements Parcelable { mNode.mAutoFillType = type; } @Override public void setAutoFillHint(@View.AutoFillHint int hint) { mNode.mAutoFillHint = hint; } @Override public void setAutoFillValue(AutoFillValue value) { mNode.mAutoFillValue = value; Loading Loading @@ -1695,6 +1717,7 @@ public class AssistStructure implements Parcelable { + ", type=" + node.getAutoFillType() + ", options=" + Arrays.toString(node.getAutoFillOptions()) + ", inputType=" + node.getInputType() + ", hint=" + Integer.toHexString(node.getAutoFillHint()) + ", value=" + node.getAutoFillValue() + ", sanitized=" + node.isSanitized()); } Loading
core/java/android/view/View.java +169 −3 Original line number Diff line number Diff line Loading @@ -974,6 +974,143 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ public static final int AUTO_FILL_MODE_MANUAL = 2; /** @hide */ @IntDef({ AUTO_FILL_HINT_NONE, AUTO_FILL_HINT_EMAIL_ADDRESS, AUTO_FILL_HINT_NAME, AUTO_FILL_HINT_POSTAL_ADDRESS, AUTO_FILL_HINT_PASSWORD, AUTO_FILL_HINT_PHONE, AUTO_FILL_HINT_USERNAME, AUTO_FILL_HINT_POSTAL_CODE, AUTO_FILL_HINT_CREDIT_CARD_NUMBER, AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY, }) @Retention(RetentionPolicy.SOURCE) public @interface AutoFillHint {} /** * No auto-fill hint is set. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_NONE = 0; /** * This view contains an email address. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_EMAIL_ADDRESS = 0x1; /** * The view contains a real name. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_NAME = 0x2; /** * The view contains a user name. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_USERNAME = 0x4; /** * The view contains a password. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_PASSWORD = 0x8; /** * The view contains a phone number. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_PHONE = 0x10; /** * The view contains a postal address. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_POSTAL_ADDRESS = 0x20; /** * The view contains a postal code. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_POSTAL_CODE = 0x40; /** * The view contains a credit card number. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_NUMBER = 0x80; /** * The view contains a credit card security code. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_SECURITY_CODE = 0x100; /** * The view contains a credit card expiration date. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DATE = 0x200; /** * The view contains the month a credit card expires. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_MONTH = 0x400; /** * The view contains the year a credit card expires. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_YEAR = 0x800; /** * The view contains the day a credit card expires. * * Use with {@link #setAutoFillHint(int)} and <a href="#attr_android:autoFillHint"> * {@code android:autoFillHint}. */ public static final int AUTO_FILL_HINT_CREDIT_CARD_EXPIRATION_DAY = 0x1000; /** * Hint for the auto-fill services that describes the content of the view. */ @AutoFillHint private int mAutoFillHint; /** * This view is enabled. Interpretation varies by subclass. * Use with ENABLED_MASK when calling setFlags. Loading Loading @@ -4799,11 +4936,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback, setFocusedByDefault(a.getBoolean(attr, true)); } break; case com.android.internal.R.styleable.View_autoFillMode: case R.styleable.View_autoFillMode: if (a.peekValue(attr) != null) { setAutoFillMode(a.getInt(attr, AUTO_FILL_MODE_INHERIT)); } break; case R.styleable.View_autoFillHint: if (a.peekValue(attr) != null) { setAutoFillHint(a.getInt(attr, AUTO_FILL_HINT_NONE)); } break; } } Loading Loading @@ -7035,6 +7177,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // to reuse the accessibility id to save space. structure.setAutoFillId(getAccessibilityViewId()); structure.setAutoFillType(autoFillType); structure.setAutoFillHint(getAutoFillHint()); structure.setAutoFillValue(getAutoFillValue()); } } Loading Loading @@ -7178,7 +7321,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Describes the auto-fill type that should be used on calls to * {@link #autoFill(AutoFillValue)} and {@link #autoFillVirtual(int, AutoFillValue)}. * * <p>By default returns {@code null}, but views should override it (and * {@link #autoFill(AutoFillValue)} to support the AutoFill Framework. */ Loading @@ -7187,10 +7330,22 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return null; } /** * Describes the content of a view so that a auto-fill service can fill in the appropriate data. * * @return The hint set via the attribute * * @attr ref android.R.styleable#View_autoFillHint */ @ViewDebug.ExportedProperty() @AutoFillHint public int getAutoFillHint() { return mAutoFillHint; } /** * Gets the {@link View}'s current auto-fill value. * * <p>By default returns {@code null}, but views should override it, * <p>By default returns {@code null}, but views should override it (and * {@link #autoFill(AutoFillValue)}, and {@link #getAutoFillType()} to support the AutoFill * Framework. */ Loading Loading @@ -8697,6 +8852,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mPrivateFlags3 |= autoFillMode << PFLAG3_AUTO_FILL_MODE_SHIFT; } /** * Sets the a hint that helps the auto-fill service to select the appropriate data to fill the * view. * * @param autoFillHint The auto-fill hint to set * @attr ref android.R.styleable#View_autoFillHint */ public void setAutoFillHint(@AutoFillHint int autoFillHint) { mAutoFillHint = autoFillHint; } /** * Set whether this view should have sound effects enabled for events such as * clicking and touching. Loading