Loading core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7492,6 +7492,7 @@ package android.app.assist { method public int getMaxTextEms(); method public int getMaxTextLength(); method public int getMinTextEms(); method @Nullable public String[] getOnReceiveContentMimeTypes(); method public int getScrollX(); method public int getScrollY(); method @Nullable public CharSequence getText(); Loading Loading @@ -48764,6 +48765,7 @@ package android.view { method public void setMaxTextEms(int); method public void setMaxTextLength(int); method public void setMinTextEms(int); method public void setOnReceiveContentMimeTypes(@Nullable String[]); method public abstract void setOpaque(boolean); method public abstract void setSelected(boolean); method public abstract void setText(CharSequence); core/java/android/app/assist/AssistStructure.java +29 −0 Original line number Diff line number Diff line Loading @@ -672,6 +672,7 @@ public class AssistStructure implements Parcelable { static final int FLAGS_CONTEXT_CLICKABLE = 0x00004000; static final int FLAGS_OPAQUE = 0x00008000; static final int FLAGS_HAS_MIME_TYPES = 0x80000000; static final int FLAGS_HAS_MATRIX = 0x40000000; static final int FLAGS_HAS_ALPHA = 0x20000000; static final int FLAGS_HAS_ELEVATION = 0x10000000; Loading Loading @@ -715,6 +716,7 @@ public class AssistStructure implements Parcelable { String mWebDomain; Bundle mExtras; LocaleList mLocaleList; String[] mOnReceiveContentMimeTypes; ViewNode[] mChildren; Loading Loading @@ -880,6 +882,9 @@ public class AssistStructure implements Parcelable { if ((flags&FLAGS_HAS_LOCALE_LIST) != 0) { mLocaleList = in.readParcelable(null); } if ((flags & FLAGS_HAS_MIME_TYPES) != 0) { mOnReceiveContentMimeTypes = in.readStringArray(); } if ((flags&FLAGS_HAS_EXTRAS) != 0) { mExtras = in.readBundle(); } Loading Loading @@ -939,6 +944,9 @@ public class AssistStructure implements Parcelable { if (mLocaleList != null) { flags |= FLAGS_HAS_LOCALE_LIST; } if (mOnReceiveContentMimeTypes != null) { flags |= FLAGS_HAS_MIME_TYPES; } if (mExtras != null) { flags |= FLAGS_HAS_EXTRAS; } Loading Loading @@ -1109,6 +1117,9 @@ public class AssistStructure implements Parcelable { if ((flags&FLAGS_HAS_LOCALE_LIST) != 0) { out.writeParcelable(mLocaleList, 0); } if ((flags & FLAGS_HAS_MIME_TYPES) != 0) { out.writeStringArray(mOnReceiveContentMimeTypes); } if ((flags&FLAGS_HAS_EXTRAS) != 0) { out.writeBundle(mExtras); } Loading Loading @@ -1526,6 +1537,15 @@ public class AssistStructure implements Parcelable { return mLocaleList; } /** * Returns the MIME types accepted by {@link View#performReceiveContent} for this view. See * {@link View#getOnReceiveContentMimeTypes()} for details. */ @Nullable public String[] getOnReceiveContentMimeTypes() { return mOnReceiveContentMimeTypes; } /** * Returns any text associated with the node that is displayed to the user, or null * if there is none. Loading Loading @@ -2145,6 +2165,11 @@ public class AssistStructure implements Parcelable { mNode.mImportantForAutofill = mode; } @Override public void setOnReceiveContentMimeTypes(@Nullable String[] mimeTypes) { mNode.mOnReceiveContentMimeTypes = mimeTypes; } @Override public void setInputType(int inputType) { mNode.mInputType = inputType; Loading Loading @@ -2422,6 +2447,10 @@ public class AssistStructure implements Parcelable { if (localeList != null) { Log.i(TAG, prefix + " LocaleList: " + localeList); } String[] mimeTypes = node.getOnReceiveContentMimeTypes(); if (mimeTypes != null) { Log.i(TAG, prefix + " MIME types: " + Arrays.toString(mimeTypes)); } String hint = node.getHint(); if (hint != null) { Log.i(TAG, prefix + " Hint: " + hint); Loading core/java/android/view/View.java +1 −0 Original line number Diff line number Diff line Loading @@ -8821,6 +8821,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, structure.setAutofillValue(getAutofillValue()); } structure.setImportantForAutofill(getImportantForAutofill()); structure.setOnReceiveContentMimeTypes(getOnReceiveContentMimeTypes()); } int ignoredParentLeft = 0; core/java/android/view/ViewStructure.java +8 −0 Original line number Diff line number Diff line Loading @@ -371,6 +371,14 @@ public abstract class ViewStructure { */ public void setImportantForAutofill(@AutofillImportance int mode) {} /** * Sets the MIME types accepted by this view. See {@link View#getOnReceiveContentMimeTypes()}. * * <p>Should only be set when the node is used for Autofill or Content Capture purposes - it * will be ignored when used for Assist. */ public void setOnReceiveContentMimeTypes(@Nullable String[] mimeTypes) {} /** * Sets the {@link android.text.InputType} bits of this node. * Loading core/java/android/view/contentcapture/ViewNode.java +22 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public final class ViewNode extends AssistStructure.ViewNode { private static final long FLAGS_HAS_AUTOFILL_HINTS = 1L << 33; private static final long FLAGS_HAS_AUTOFILL_OPTIONS = 1L << 34; private static final long FLAGS_HAS_HINT_ID_ENTRY = 1L << 35; private static final long FLAGS_HAS_MIME_TYPES = 1L << 36; /** Flags used to optimize what's written to the parcel */ private long mFlags; Loading Loading @@ -113,6 +114,7 @@ public final class ViewNode extends AssistStructure.ViewNode { private String[] mAutofillHints; private AutofillValue mAutofillValue; private CharSequence[] mAutofillOptions; private String[] mOnReceiveContentMimeTypes; /** @hide */ public ViewNode() { Loading Loading @@ -169,6 +171,9 @@ public final class ViewNode extends AssistStructure.ViewNode { if ((nodeFlags & FLAGS_HAS_LOCALE_LIST) != 0) { mLocaleList = parcel.readParcelable(null); } if ((nodeFlags & FLAGS_HAS_MIME_TYPES) != 0) { mOnReceiveContentMimeTypes = parcel.readStringArray(); } if ((nodeFlags & FLAGS_HAS_INPUT_TYPE) != 0) { mInputType = parcel.readInt(); } Loading Loading @@ -463,6 +468,12 @@ public final class ViewNode extends AssistStructure.ViewNode { return mAutofillOptions; } @Override @Nullable public String[] getOnReceiveContentMimeTypes() { return mOnReceiveContentMimeTypes; } @Nullable @Override public LocaleList getLocaleList() { Loading Loading @@ -508,6 +519,9 @@ public final class ViewNode extends AssistStructure.ViewNode { if (mLocaleList != null) { nodeFlags |= FLAGS_HAS_LOCALE_LIST; } if (mOnReceiveContentMimeTypes != null) { nodeFlags |= FLAGS_HAS_MIME_TYPES; } if (mInputType != 0) { nodeFlags |= FLAGS_HAS_INPUT_TYPE; } Loading Loading @@ -584,6 +598,9 @@ public final class ViewNode extends AssistStructure.ViewNode { if ((nodeFlags & FLAGS_HAS_LOCALE_LIST) != 0) { parcel.writeParcelable(mLocaleList, 0); } if ((nodeFlags & FLAGS_HAS_MIME_TYPES) != 0) { parcel.writeStringArray(mOnReceiveContentMimeTypes); } if ((nodeFlags & FLAGS_HAS_INPUT_TYPE) != 0) { parcel.writeInt(mInputType); } Loading Loading @@ -911,6 +928,11 @@ public final class ViewNode extends AssistStructure.ViewNode { mNode.mAutofillType = type; } @Override public void setOnReceiveContentMimeTypes(@Nullable String[] mimeTypes) { mNode.mOnReceiveContentMimeTypes = mimeTypes; } @Override public void setAutofillHints(String[] hints) { mNode.mAutofillHints = hints; Loading Loading
core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7492,6 +7492,7 @@ package android.app.assist { method public int getMaxTextEms(); method public int getMaxTextLength(); method public int getMinTextEms(); method @Nullable public String[] getOnReceiveContentMimeTypes(); method public int getScrollX(); method public int getScrollY(); method @Nullable public CharSequence getText(); Loading Loading @@ -48764,6 +48765,7 @@ package android.view { method public void setMaxTextEms(int); method public void setMaxTextLength(int); method public void setMinTextEms(int); method public void setOnReceiveContentMimeTypes(@Nullable String[]); method public abstract void setOpaque(boolean); method public abstract void setSelected(boolean); method public abstract void setText(CharSequence);
core/java/android/app/assist/AssistStructure.java +29 −0 Original line number Diff line number Diff line Loading @@ -672,6 +672,7 @@ public class AssistStructure implements Parcelable { static final int FLAGS_CONTEXT_CLICKABLE = 0x00004000; static final int FLAGS_OPAQUE = 0x00008000; static final int FLAGS_HAS_MIME_TYPES = 0x80000000; static final int FLAGS_HAS_MATRIX = 0x40000000; static final int FLAGS_HAS_ALPHA = 0x20000000; static final int FLAGS_HAS_ELEVATION = 0x10000000; Loading Loading @@ -715,6 +716,7 @@ public class AssistStructure implements Parcelable { String mWebDomain; Bundle mExtras; LocaleList mLocaleList; String[] mOnReceiveContentMimeTypes; ViewNode[] mChildren; Loading Loading @@ -880,6 +882,9 @@ public class AssistStructure implements Parcelable { if ((flags&FLAGS_HAS_LOCALE_LIST) != 0) { mLocaleList = in.readParcelable(null); } if ((flags & FLAGS_HAS_MIME_TYPES) != 0) { mOnReceiveContentMimeTypes = in.readStringArray(); } if ((flags&FLAGS_HAS_EXTRAS) != 0) { mExtras = in.readBundle(); } Loading Loading @@ -939,6 +944,9 @@ public class AssistStructure implements Parcelable { if (mLocaleList != null) { flags |= FLAGS_HAS_LOCALE_LIST; } if (mOnReceiveContentMimeTypes != null) { flags |= FLAGS_HAS_MIME_TYPES; } if (mExtras != null) { flags |= FLAGS_HAS_EXTRAS; } Loading Loading @@ -1109,6 +1117,9 @@ public class AssistStructure implements Parcelable { if ((flags&FLAGS_HAS_LOCALE_LIST) != 0) { out.writeParcelable(mLocaleList, 0); } if ((flags & FLAGS_HAS_MIME_TYPES) != 0) { out.writeStringArray(mOnReceiveContentMimeTypes); } if ((flags&FLAGS_HAS_EXTRAS) != 0) { out.writeBundle(mExtras); } Loading Loading @@ -1526,6 +1537,15 @@ public class AssistStructure implements Parcelable { return mLocaleList; } /** * Returns the MIME types accepted by {@link View#performReceiveContent} for this view. See * {@link View#getOnReceiveContentMimeTypes()} for details. */ @Nullable public String[] getOnReceiveContentMimeTypes() { return mOnReceiveContentMimeTypes; } /** * Returns any text associated with the node that is displayed to the user, or null * if there is none. Loading Loading @@ -2145,6 +2165,11 @@ public class AssistStructure implements Parcelable { mNode.mImportantForAutofill = mode; } @Override public void setOnReceiveContentMimeTypes(@Nullable String[] mimeTypes) { mNode.mOnReceiveContentMimeTypes = mimeTypes; } @Override public void setInputType(int inputType) { mNode.mInputType = inputType; Loading Loading @@ -2422,6 +2447,10 @@ public class AssistStructure implements Parcelable { if (localeList != null) { Log.i(TAG, prefix + " LocaleList: " + localeList); } String[] mimeTypes = node.getOnReceiveContentMimeTypes(); if (mimeTypes != null) { Log.i(TAG, prefix + " MIME types: " + Arrays.toString(mimeTypes)); } String hint = node.getHint(); if (hint != null) { Log.i(TAG, prefix + " Hint: " + hint); Loading
core/java/android/view/View.java +1 −0 Original line number Diff line number Diff line Loading @@ -8821,6 +8821,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, structure.setAutofillValue(getAutofillValue()); } structure.setImportantForAutofill(getImportantForAutofill()); structure.setOnReceiveContentMimeTypes(getOnReceiveContentMimeTypes()); } int ignoredParentLeft = 0;
core/java/android/view/ViewStructure.java +8 −0 Original line number Diff line number Diff line Loading @@ -371,6 +371,14 @@ public abstract class ViewStructure { */ public void setImportantForAutofill(@AutofillImportance int mode) {} /** * Sets the MIME types accepted by this view. See {@link View#getOnReceiveContentMimeTypes()}. * * <p>Should only be set when the node is used for Autofill or Content Capture purposes - it * will be ignored when used for Assist. */ public void setOnReceiveContentMimeTypes(@Nullable String[] mimeTypes) {} /** * Sets the {@link android.text.InputType} bits of this node. * Loading
core/java/android/view/contentcapture/ViewNode.java +22 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public final class ViewNode extends AssistStructure.ViewNode { private static final long FLAGS_HAS_AUTOFILL_HINTS = 1L << 33; private static final long FLAGS_HAS_AUTOFILL_OPTIONS = 1L << 34; private static final long FLAGS_HAS_HINT_ID_ENTRY = 1L << 35; private static final long FLAGS_HAS_MIME_TYPES = 1L << 36; /** Flags used to optimize what's written to the parcel */ private long mFlags; Loading Loading @@ -113,6 +114,7 @@ public final class ViewNode extends AssistStructure.ViewNode { private String[] mAutofillHints; private AutofillValue mAutofillValue; private CharSequence[] mAutofillOptions; private String[] mOnReceiveContentMimeTypes; /** @hide */ public ViewNode() { Loading Loading @@ -169,6 +171,9 @@ public final class ViewNode extends AssistStructure.ViewNode { if ((nodeFlags & FLAGS_HAS_LOCALE_LIST) != 0) { mLocaleList = parcel.readParcelable(null); } if ((nodeFlags & FLAGS_HAS_MIME_TYPES) != 0) { mOnReceiveContentMimeTypes = parcel.readStringArray(); } if ((nodeFlags & FLAGS_HAS_INPUT_TYPE) != 0) { mInputType = parcel.readInt(); } Loading Loading @@ -463,6 +468,12 @@ public final class ViewNode extends AssistStructure.ViewNode { return mAutofillOptions; } @Override @Nullable public String[] getOnReceiveContentMimeTypes() { return mOnReceiveContentMimeTypes; } @Nullable @Override public LocaleList getLocaleList() { Loading Loading @@ -508,6 +519,9 @@ public final class ViewNode extends AssistStructure.ViewNode { if (mLocaleList != null) { nodeFlags |= FLAGS_HAS_LOCALE_LIST; } if (mOnReceiveContentMimeTypes != null) { nodeFlags |= FLAGS_HAS_MIME_TYPES; } if (mInputType != 0) { nodeFlags |= FLAGS_HAS_INPUT_TYPE; } Loading Loading @@ -584,6 +598,9 @@ public final class ViewNode extends AssistStructure.ViewNode { if ((nodeFlags & FLAGS_HAS_LOCALE_LIST) != 0) { parcel.writeParcelable(mLocaleList, 0); } if ((nodeFlags & FLAGS_HAS_MIME_TYPES) != 0) { parcel.writeStringArray(mOnReceiveContentMimeTypes); } if ((nodeFlags & FLAGS_HAS_INPUT_TYPE) != 0) { parcel.writeInt(mInputType); } Loading Loading @@ -911,6 +928,11 @@ public final class ViewNode extends AssistStructure.ViewNode { mNode.mAutofillType = type; } @Override public void setOnReceiveContentMimeTypes(@Nullable String[] mimeTypes) { mNode.mOnReceiveContentMimeTypes = mimeTypes; } @Override public void setAutofillHints(String[] hints) { mNode.mAutofillHints = hints; Loading