Merge "Rename autoFillHint to autoFillHints." into oc-dev

This commit is contained in:
TreeHugger Robot
2017-03-31 01:41:38 +00:00
committed by Android (Google) Code Review
9 changed files with 58 additions and 58 deletions

View File

@@ -311,7 +311,7 @@ package android {
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 @@ package android.app.assist {
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 @@ package android.view {
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 @@ 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(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 @@ 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(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);

View File

@@ -425,7 +425,7 @@ package android {
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 @@ package android.app.assist {
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 @@ package android.view {
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 @@ 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(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 @@ 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(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);

View File

@@ -311,7 +311,7 @@ package android {
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 @@ package android.app.assist {
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 @@ package android.view {
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 @@ 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(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 @@ 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(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);

View File

@@ -593,7 +593,7 @@ public class AssistStructure implements Parcelable {
// 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 @@ public class AssistStructure implements Parcelable {
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 @@ public class AssistStructure implements Parcelable {
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 @@ public class AssistStructure implements Parcelable {
* <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 @@ public class AssistStructure implements Parcelable {
}
@Override
public void setAutofillHint(@Nullable String[] hint) {
mNode.mAutofillHint = hint;
public void setAutofillHints(@Nullable String[] hints) {
mNode.mAutofillHints = hints;
}
@Override
@@ -1836,7 +1836,7 @@ public class AssistStructure implements Parcelable {
+ ", 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());
}

View File

@@ -982,7 +982,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
/**
* 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 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
/**
* 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;
}
}

View File

@@ -306,10 +306,10 @@ public abstract class ViewStructure {
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.

View File

@@ -2646,7 +2646,7 @@ public class WebView extends AbsoluteLayout
* <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)}.

View File

@@ -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. -->

View File

@@ -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"/>