Loading core/java/android/app/assist/AssistStructure.java +24 −1 Original line number Diff line number Diff line Loading @@ -651,6 +651,7 @@ public class AssistStructure implements Parcelable { // POJO used to override some autofill-related values when the node is parcelized. // Not written to parcel. AutofillOverlay mAutofillOverlay; boolean mIsCredential; int mX; int mY; Loading Loading @@ -799,6 +800,7 @@ public class AssistStructure implements Parcelable { if (autofillFlags != 0) { mSanitized = in.readInt() == 1; mIsCredential = in.readInt() == 1; mImportantForAutofill = in.readInt(); if ((autofillFlags & AUTOFILL_FLAGS_HAS_AUTOFILL_VIEW_ID) != 0) { Loading Loading @@ -1033,6 +1035,7 @@ public class AssistStructure implements Parcelable { if (autofillFlags != 0) { out.writeInt(mSanitized ? 1 : 0); out.writeInt(mIsCredential ? 1 : 0); out.writeInt(mImportantForAutofill); writeSensitive = mSanitized || !sanitizeOnWrite; if ((autofillFlags & AUTOFILL_FLAGS_HAS_AUTOFILL_VIEW_ID) != 0) { Loading Loading @@ -1245,6 +1248,19 @@ public class AssistStructure implements Parcelable { return mAutofillOptions; } /** * @return whether the node is a credential. * * <p>It's only relevant when the {@link AssistStructure} is used for autofill purposes, * not for assist purposes. * TODO(b/303677885): add TestApi * * @hide */ public boolean isCredential() { return mIsCredential; } /** * Gets the {@link android.text.InputType} bits of this structure. * Loading Loading @@ -2182,6 +2198,11 @@ public class AssistStructure implements Parcelable { mNode.mImportantForAutofill = mode; } @Override public void setIsCredential(boolean isCredential) { mNode.mIsCredential = isCredential; } @Override public void setReceiveContentMimeTypes(@Nullable String[] mimeTypes) { mNode.mReceiveContentMimeTypes = mimeTypes; Loading Loading @@ -2498,7 +2519,9 @@ public class AssistStructure implements Parcelable { + ", value=" + node.getAutofillValue() + ", sanitized=" + node.isSanitized() + ", important=" + node.getImportantForAutofill() + ", visibility=" + node.getVisibility()); + ", visibility=" + node.getVisibility() + ", isCredential=" + node.isCredential() ); } final int NCHILDREN = node.getChildCount(); Loading core/java/android/view/View.java +1 −0 Original line number Diff line number Diff line Loading @@ -9308,6 +9308,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, structure.setAutofillType(autofillType); structure.setAutofillHints(getAutofillHints()); structure.setAutofillValue(getAutofillValue()); structure.setIsCredential(isCredential()); } structure.setImportantForAutofill(getImportantForAutofill()); structure.setReceiveContentMimeTypes(getReceiveContentMimeTypes()); core/java/android/view/ViewStructure.java +7 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,13 @@ public abstract class ViewStructure { */ public void setImportantForAutofill(@AutofillImportance int mode) {} /** * Sets whether the node is a credential. See {@link View#isCredential}. * * @hide */ public void setIsCredential(boolean isCredential) {} /** * Sets the MIME types accepted by this view. See {@link View#getReceiveContentMimeTypes()}. * Loading Loading
core/java/android/app/assist/AssistStructure.java +24 −1 Original line number Diff line number Diff line Loading @@ -651,6 +651,7 @@ public class AssistStructure implements Parcelable { // POJO used to override some autofill-related values when the node is parcelized. // Not written to parcel. AutofillOverlay mAutofillOverlay; boolean mIsCredential; int mX; int mY; Loading Loading @@ -799,6 +800,7 @@ public class AssistStructure implements Parcelable { if (autofillFlags != 0) { mSanitized = in.readInt() == 1; mIsCredential = in.readInt() == 1; mImportantForAutofill = in.readInt(); if ((autofillFlags & AUTOFILL_FLAGS_HAS_AUTOFILL_VIEW_ID) != 0) { Loading Loading @@ -1033,6 +1035,7 @@ public class AssistStructure implements Parcelable { if (autofillFlags != 0) { out.writeInt(mSanitized ? 1 : 0); out.writeInt(mIsCredential ? 1 : 0); out.writeInt(mImportantForAutofill); writeSensitive = mSanitized || !sanitizeOnWrite; if ((autofillFlags & AUTOFILL_FLAGS_HAS_AUTOFILL_VIEW_ID) != 0) { Loading Loading @@ -1245,6 +1248,19 @@ public class AssistStructure implements Parcelable { return mAutofillOptions; } /** * @return whether the node is a credential. * * <p>It's only relevant when the {@link AssistStructure} is used for autofill purposes, * not for assist purposes. * TODO(b/303677885): add TestApi * * @hide */ public boolean isCredential() { return mIsCredential; } /** * Gets the {@link android.text.InputType} bits of this structure. * Loading Loading @@ -2182,6 +2198,11 @@ public class AssistStructure implements Parcelable { mNode.mImportantForAutofill = mode; } @Override public void setIsCredential(boolean isCredential) { mNode.mIsCredential = isCredential; } @Override public void setReceiveContentMimeTypes(@Nullable String[] mimeTypes) { mNode.mReceiveContentMimeTypes = mimeTypes; Loading Loading @@ -2498,7 +2519,9 @@ public class AssistStructure implements Parcelable { + ", value=" + node.getAutofillValue() + ", sanitized=" + node.isSanitized() + ", important=" + node.getImportantForAutofill() + ", visibility=" + node.getVisibility()); + ", visibility=" + node.getVisibility() + ", isCredential=" + node.isCredential() ); } final int NCHILDREN = node.getChildCount(); Loading
core/java/android/view/View.java +1 −0 Original line number Diff line number Diff line Loading @@ -9308,6 +9308,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, structure.setAutofillType(autofillType); structure.setAutofillHints(getAutofillHints()); structure.setAutofillValue(getAutofillValue()); structure.setIsCredential(isCredential()); } structure.setImportantForAutofill(getImportantForAutofill()); structure.setReceiveContentMimeTypes(getReceiveContentMimeTypes());
core/java/android/view/ViewStructure.java +7 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,13 @@ public abstract class ViewStructure { */ public void setImportantForAutofill(@AutofillImportance int mode) {} /** * Sets whether the node is a credential. See {@link View#isCredential}. * * @hide */ public void setIsCredential(boolean isCredential) {} /** * Sets the MIME types accepted by this view. See {@link View#getReceiveContentMimeTypes()}. * Loading