Merge "Rename autoFillHint to autoFillHints." into oc-dev
diff --git a/api/current.txt b/api/current.txt
index 00202b6..fcb80f3 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -311,7 +311,7 @@
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
field public static final int autoVerify = 16844014; // 0x10104ee
- field public static final int autofillHint = 16844121; // 0x1010559
+ 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
@@ -6582,7 +6582,7 @@
public static class AssistStructure.ViewNode {
method public float getAlpha();
- method public java.lang.String[] getAutoFillHint();
+ method public java.lang.String[] getAutoFillHints();
method public android.view.autofill.AutofillId getAutofillId();
method public java.lang.String[] getAutofillOptions();
method public int getAutofillType();
@@ -45256,7 +45256,7 @@
method public float getAlpha();
method public android.view.animation.Animation getAnimation();
method public android.os.IBinder getApplicationWindowToken();
- method public java.lang.String[] getAutofillHint();
+ method public java.lang.String[] getAutofillHints();
method public int getAutofillMode();
method public int getAutofillType();
method public android.view.autofill.AutofillValue getAutofillValue();
@@ -45577,7 +45577,7 @@
method public void setActivated(boolean);
method public void setAlpha(float);
method public void setAnimation(android.view.animation.Animation);
- method public void setAutofillHint(java.lang.String...);
+ 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);
@@ -46392,7 +46392,7 @@
method public abstract void setAccessibilityFocused(boolean);
method public abstract void setActivated(boolean);
method public abstract void setAlpha(float);
- method public abstract void setAutofillHint(java.lang.String[]);
+ method public abstract void setAutofillHints(java.lang.String[]);
method public abstract void setAutofillId(android.view.ViewStructure, int);
method public abstract void setAutofillOptions(java.lang.String[]);
method public abstract void setAutofillType(int);
diff --git a/api/system-current.txt b/api/system-current.txt
index 7eca4ae..8eb5466 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -425,7 +425,7 @@
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
field public static final int autoVerify = 16844014; // 0x10104ee
- field public static final int autofillHint = 16844121; // 0x1010559
+ 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
@@ -6819,7 +6819,7 @@
public static class AssistStructure.ViewNode {
method public float getAlpha();
- method public java.lang.String[] getAutoFillHint();
+ method public java.lang.String[] getAutoFillHints();
method public android.view.autofill.AutofillId getAutofillId();
method public java.lang.String[] getAutofillOptions();
method public int getAutofillType();
@@ -48713,7 +48713,7 @@
method public float getAlpha();
method public android.view.animation.Animation getAnimation();
method public android.os.IBinder getApplicationWindowToken();
- method public java.lang.String[] getAutofillHint();
+ method public java.lang.String[] getAutofillHints();
method public int getAutofillMode();
method public int getAutofillType();
method public android.view.autofill.AutofillValue getAutofillValue();
@@ -49034,7 +49034,7 @@
method public void setActivated(boolean);
method public void setAlpha(float);
method public void setAnimation(android.view.animation.Animation);
- method public void setAutofillHint(java.lang.String...);
+ 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);
@@ -49849,7 +49849,7 @@
method public abstract void setAccessibilityFocused(boolean);
method public abstract void setActivated(boolean);
method public abstract void setAlpha(float);
- method public abstract void setAutofillHint(java.lang.String[]);
+ method public abstract void setAutofillHints(java.lang.String[]);
method public abstract void setAutofillId(android.view.ViewStructure, int);
method public abstract void setAutofillOptions(java.lang.String[]);
method public abstract void setAutofillType(int);
diff --git a/api/test-current.txt b/api/test-current.txt
index f800461..c3b27be 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -311,7 +311,7 @@
field public static final deprecated int autoText = 16843114; // 0x101016a
field public static final int autoUrlDetect = 16843404; // 0x101028c
field public static final int autoVerify = 16844014; // 0x10104ee
- field public static final int autofillHint = 16844121; // 0x1010559
+ 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
@@ -6611,7 +6611,7 @@
public static class AssistStructure.ViewNode {
method public float getAlpha();
- method public java.lang.String[] getAutoFillHint();
+ method public java.lang.String[] getAutoFillHints();
method public android.view.autofill.AutofillId getAutofillId();
method public java.lang.String[] getAutofillOptions();
method public int getAutofillType();
@@ -45630,7 +45630,7 @@
method public float getAlpha();
method public android.view.animation.Animation getAnimation();
method public android.os.IBinder getApplicationWindowToken();
- method public java.lang.String[] getAutofillHint();
+ method public java.lang.String[] getAutofillHints();
method public int getAutofillMode();
method public int getAutofillType();
method public android.view.autofill.AutofillValue getAutofillValue();
@@ -45954,7 +45954,7 @@
method public void setActivated(boolean);
method public void setAlpha(float);
method public void setAnimation(android.view.animation.Animation);
- method public void setAutofillHint(java.lang.String...);
+ 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);
@@ -46773,7 +46773,7 @@
method public abstract void setAccessibilityFocused(boolean);
method public abstract void setActivated(boolean);
method public abstract void setAlpha(float);
- method public abstract void setAutofillHint(java.lang.String[]);
+ method public abstract void setAutofillHints(java.lang.String[]);
method public abstract void setAutofillId(android.view.ViewStructure, int);
method public abstract void setAutofillOptions(java.lang.String[]);
method public abstract void setAutofillType(int);
diff --git a/core/java/android/app/assist/AssistStructure.java b/core/java/android/app/assist/AssistStructure.java
index a343524..124267b 100644
--- a/core/java/android/app/assist/AssistStructure.java
+++ b/core/java/android/app/assist/AssistStructure.java
@@ -593,7 +593,7 @@
// fields (viewId and childId) of the field.
AutofillId mAutofillId;
@View.AutofillType int mAutofillType;
- @Nullable String[] mAutofillHint;
+ @Nullable String[] mAutofillHints;
AutofillValue mAutofillValue;
String[] mAutofillOptions;
boolean mSanitized;
@@ -685,7 +685,7 @@
mSanitized = in.readInt() == 1;
mAutofillId = in.readParcelable(null);
mAutofillType = in.readInt();
- mAutofillHint = in.readStringArray();
+ mAutofillHints = in.readStringArray();
mAutofillValue = in.readParcelable(null);
mAutofillOptions = in.readStringArray();
}
@@ -830,7 +830,7 @@
out.writeInt(mSanitized ? 1 : 0);
out.writeParcelable(mAutofillId, 0);
out.writeInt(mAutofillType);
- out.writeStringArray(mAutofillHint);
+ out.writeStringArray(mAutofillHints);
final AutofillValue sanitizedValue = writeSensitive ? mAutofillValue : null;
out.writeParcelable(sanitizedValue, 0);
out.writeStringArray(mAutofillOptions);
@@ -973,10 +973,10 @@
* <p>It's only set when the {@link AssistStructure} is used for autofilling purposes, not
* for assist.</p>
*
- * @return The hint for this view
+ * @return The hints for this view
*/
- @Nullable public String[] getAutoFillHint() {
- return mAutofillHint;
+ @Nullable public String[] getAutoFillHints() {
+ return mAutofillHints;
}
/**
@@ -1678,8 +1678,8 @@
}
@Override
- public void setAutofillHint(@Nullable String[] hint) {
- mNode.mAutofillHint = hint;
+ public void setAutofillHints(@Nullable String[] hints) {
+ mNode.mAutofillHints = hints;
}
@Override
@@ -1836,7 +1836,7 @@
+ ", type=" + node.getAutofillType()
+ ", options=" + Arrays.toString(node.getAutofillOptions())
+ ", inputType=" + node.getInputType()
- + ", hint=" + Arrays.toString(node.getAutoFillHint())
+ + ", hints=" + Arrays.toString(node.getAutoFillHints())
+ ", value=" + node.getAutofillValue()
+ ", sanitized=" + node.isSanitized());
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 23fcb55..884283d 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -982,7 +982,7 @@
/**
* This view contains an email address.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value #AUTOFILL_HINT_EMAIL_ADDRESS}"
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value #AUTOFILL_HINT_EMAIL_ADDRESS}"
* to <a href="#attr_android:autofillHint"> {@code android:autofillHint}.
*/
public static final String AUTOFILL_HINT_EMAIL_ADDRESS = "emailAddress";
@@ -990,7 +990,7 @@
/**
* The view contains a real name.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value #AUTOFILL_HINT_NAME}" to
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value #AUTOFILL_HINT_NAME}" to
* <a href="#attr_android:autofillHint"> {@code android:autofillHint}.
*/
public static final String AUTOFILL_HINT_NAME = "name";
@@ -998,7 +998,7 @@
/**
* The view contains a user name.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value #AUTOFILL_HINT_USERNAME}" to
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value #AUTOFILL_HINT_USERNAME}" to
* <a href="#attr_android:autofillHint"> {@code android:autofillHint}.
*/
public static final String AUTOFILL_HINT_USERNAME = "username";
@@ -1006,7 +1006,7 @@
/**
* The view contains a password.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value #AUTOFILL_HINT_PASSWORD}" to
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value #AUTOFILL_HINT_PASSWORD}" to
* <a href="#attr_android:autofillHint"> {@code android:autofillHint}.
*/
public static final String AUTOFILL_HINT_PASSWORD = "password";
@@ -1014,7 +1014,7 @@
/**
* The view contains a phone number.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value #AUTOFILL_HINT_PHONE}" to
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value #AUTOFILL_HINT_PHONE}" to
* <a href="#attr_android:autofillHint"> {@code android:autofillHint}.
*/
public static final String AUTOFILL_HINT_PHONE = "phone";
@@ -1022,7 +1022,7 @@
/**
* The view contains a postal address.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value #AUTOFILL_HINT_POSTAL_ADDRESS}"
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value #AUTOFILL_HINT_POSTAL_ADDRESS}"
* to <a href="#attr_android:autofillHint"> {@code android:autofillHint}.
*/
public static final String AUTOFILL_HINT_POSTAL_ADDRESS = "postalAddress";
@@ -1030,7 +1030,7 @@
/**
* The view contains a postal code.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value #AUTOFILL_HINT_POSTAL_CODE}" to
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value #AUTOFILL_HINT_POSTAL_CODE}" to
* <a href="#attr_android:autofillHint"> {@code android:autofillHint}.
*/
public static final String AUTOFILL_HINT_POSTAL_CODE = "postalCode";
@@ -1038,7 +1038,7 @@
/**
* The view contains a credit card number.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value
* #AUTOFILL_HINT_CREDIT_CARD_NUMBER}" to <a href="#attr_android:autofillHint"> {@code
* android:autofillHint}.
*/
@@ -1047,7 +1047,7 @@
/**
* The view contains a credit card security code.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value
* #AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE}" to <a href="#attr_android:autofillHint"> {@code
* android:autofillHint}.
*/
@@ -1056,7 +1056,7 @@
/**
* The view contains a credit card expiration date.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value
* #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE}" to <a href="#attr_android:autofillHint"> {@code
* android:autofillHint}.
*/
@@ -1066,7 +1066,7 @@
/**
* The view contains the month a credit card expires.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value
* #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH}" to <a href="#attr_android:autofillHint"> {@code
* android:autofillHint}.
*/
@@ -1076,7 +1076,7 @@
/**
* The view contains the year a credit card expires.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value
* #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR}" to <a href="#attr_android:autofillHint"> {@code
* android:autofillHint}.
*/
@@ -1086,7 +1086,7 @@
/**
* The view contains the day a credit card expires.
*
- * Use with {@link #setAutofillHint(String[])}, or set "{@value
+ * Use with {@link #setAutofillHints(String[])}, or set "{@value
* #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY}" to <a href="#attr_android:autofillHint"> {@code
* android:autofillHint}.
*/
@@ -1095,7 +1095,7 @@
/**
* Hintd for the autofill services that describes the content of the view.
*/
- private @Nullable String[] mAutofillHint;
+ private @Nullable String[] mAutofillHints;
/** @hide */
@IntDef({
@@ -5024,7 +5024,7 @@
setAutofillMode(a.getInt(attr, AUTOFILL_MODE_INHERIT));
}
break;
- case R.styleable.View_autofillHint:
+ case R.styleable.View_autofillHints:
if (a.peekValue(attr) != null) {
CharSequence[] rawHints = null;
String rawString = null;
@@ -5044,7 +5044,7 @@
if (rawHints == null) {
if (rawString == null) {
throw new IllegalArgumentException(
- "Could not resolve autofillHint");
+ "Could not resolve autofillHints");
} else {
rawHints = rawString.split(",");
}
@@ -5056,7 +5056,7 @@
for (int rawHintNum = 0; rawHintNum < numHints; rawHintNum++) {
hints[rawHintNum] = rawHints[rawHintNum].toString().trim();
}
- setAutofillHint(hints);
+ setAutofillHints(hints);
}
break;
case R.styleable.View_importantForAutofill:
@@ -7311,7 +7311,7 @@
// For example, only TextViews that are editable support autofill
if (autofillType != AUTOFILL_TYPE_NONE) {
structure.setAutofillType(autofillType);
- structure.setAutofillHint(getAutofillHint());
+ structure.setAutofillHints(getAutofillHints());
structure.setAutofillValue(getAutofillValue());
}
}
@@ -7476,13 +7476,13 @@
/**
* Describes the content of a view so that a autofill service can fill in the appropriate data.
*
- * @return The hint set via the attribute or {@code null} if no hint it set.
+ * @return The hints set via the attribute or {@code null} if no hint it set.
*
- * @attr ref android.R.styleable#View_autofillHint
+ * @attr ref android.R.styleable#View_autofillHints
*/
@ViewDebug.ExportedProperty()
- @Nullable public String[] getAutofillHint() {
- return mAutofillHint;
+ @Nullable public String[] getAutofillHints() {
+ return mAutofillHints;
}
/**
@@ -9111,17 +9111,17 @@
}
/**
- * Sets the a hint that helps the autofill service to select the appropriate data to fill the
+ * Sets the hints that helps the autofill service to select the appropriate data to fill the
* view.
*
- * @param autofillHint The autofill hint to set. If the array is emtpy, {@code null} is set.
- * @attr ref android.R.styleable#View_autofillHint
+ * @param autofillHints The autofill hints to set. If the array is emtpy, {@code null} is set.
+ * @attr ref android.R.styleable#View_autofillHints
*/
- public void setAutofillHint(@Nullable String... autofillHint) {
- if (autofillHint == null || autofillHint.length == 0) {
- mAutofillHint = null;
+ public void setAutofillHints(@Nullable String... autofillHints) {
+ if (autofillHints == null || autofillHints.length == 0) {
+ mAutofillHints = null;
} else {
- mAutofillHint = autofillHint;
+ mAutofillHints = autofillHints;
}
}
diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java
index ad4b9d7..65f3c90 100644
--- a/core/java/android/view/ViewStructure.java
+++ b/core/java/android/view/ViewStructure.java
@@ -306,10 +306,10 @@
public abstract void setAutofillType(@View.AutofillType int type);
/**
- * Sets the a hint that helps the autofill service to select the appropriate data to fill the
+ * Sets the a hints that helps the autofill service to select the appropriate data to fill the
* view.
*/
- public abstract void setAutofillHint(@Nullable String[] hint);
+ public abstract void setAutofillHints(@Nullable String[] hint);
/**
* Sets the {@link AutofillValue} representing the current value of this node.
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index bc49123..b45c4a7 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -2646,7 +2646,7 @@
* <li>Otherwise, the class name should be {@code HTML.iframe}.
* </ol>
* <li>The W3C autofill field ({@code autocomplete} tag attribute) maps to
- * {@link ViewStructure#setAutofillHint(String[])}.
+ * {@link ViewStructure#setAutofillHints(String[])}.
* <li>The {@code type} attribute of {@code INPUT} tags maps to
* {@link ViewStructure#setInputType(int)}.
* <li>The {@code name} attribute maps to {@link ViewStructure#setIdEntry(String)}.
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index a3b2705..554f50c 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2310,7 +2310,7 @@
<!-- Describes the content of a view so that a autofill service can fill in the appropriate
data. Multiple hints can be combined in a comma separated list or an array of strings
to mean e.g. emailAddress or postalAddress. -->
- <attr name="autofillHint" format="string|reference" />
+ <attr name="autofillHints" format="string|reference" />
<!-- Hints the Android System whether the view node associated with this View should be
included in a view structure used for autofill purposes. -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 6e20208..624eb59 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2802,7 +2802,7 @@
<public name="secondaryContentAlpha" />
<public name="requiredFeature" />
<public name="requiredNotFeature" />
- <public name="autofillHint" />
+ <public name="autofillHints" />
<public name="fontProviderPackage" />
<public name="importantForAutofill" />
<public name="recycleEnabled"/>