Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 709ff779 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improved WebView -> ViewStructure mapping for Autofill."

parents 2ff58247 1a1e4687
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46356,6 +46356,7 @@ package android.view {
    method public abstract void setFocused(boolean);
    method public abstract void setHint(java.lang.CharSequence);
    method public abstract void setId(int, java.lang.String, java.lang.String, java.lang.String);
    method public abstract void setIdEntry(java.lang.String);
    method public abstract void setInputType(int);
    method public abstract void setLongClickable(boolean);
    method public abstract void setOpaque(boolean);
+1 −0
Original line number Diff line number Diff line
@@ -49819,6 +49819,7 @@ package android.view {
    method public abstract void setFocused(boolean);
    method public abstract void setHint(java.lang.CharSequence);
    method public abstract void setId(int, java.lang.String, java.lang.String, java.lang.String);
    method public abstract void setIdEntry(java.lang.String);
    method public abstract void setInputType(int);
    method public abstract void setLongClickable(boolean);
    method public abstract void setOpaque(boolean);
+1 −0
Original line number Diff line number Diff line
@@ -46725,6 +46725,7 @@ package android.view {
    method public abstract void setFocused(boolean);
    method public abstract void setHint(java.lang.CharSequence);
    method public abstract void setId(int, java.lang.String, java.lang.String, java.lang.String);
    method public abstract void setIdEntry(java.lang.String);
    method public abstract void setInputType(int);
    method public abstract void setLongClickable(boolean);
    method public abstract void setOpaque(boolean);
+18 −0
Original line number Diff line number Diff line
@@ -639,6 +639,7 @@ public class AssistStructure implements Parcelable {
        static final int FLAGS_HAS_CHILDREN = 0x00100000;
        static final int FLAGS_HAS_URL = 0x00080000;
        static final int FLAGS_HAS_INPUT_TYPE = 0x00040000;
        static final int FLAGS_HAS_ENTRY_ID = 0x00020000;
        static final int FLAGS_ALL_CONTROL = 0xfff00000;

        int mFlags;
@@ -672,7 +673,10 @@ public class AssistStructure implements Parcelable {
                        mIdPackage = preader.readString();
                    }
                }
            } else if ((flags&FLAGS_HAS_ENTRY_ID) != 0) {
                mIdEntry = preader.readString();
            }

            if ((flags&FLAGS_HAS_AUTOFILL_DATA) != 0) {
                mSanitized = in.readInt() == 1;
                mAutofillId = in.readParcelable(null);
@@ -745,6 +749,8 @@ public class AssistStructure implements Parcelable {
            int flags = mFlags & ~FLAGS_ALL_CONTROL;
            if (mId != View.NO_ID) {
                flags |= FLAGS_HAS_ID;
            } else if (mIdEntry != null ){
                flags |= FLAGS_HAS_ENTRY_ID;
            }
            if (mAutofillId != null) {
                flags |= FLAGS_HAS_AUTOFILL_DATA;
@@ -805,7 +811,10 @@ public class AssistStructure implements Parcelable {
                        pwriter.writeString(mIdPackage);
                    }
                }
            } else if ((flags&FLAGS_HAS_ENTRY_ID) != 0) {
                pwriter.writeString(mIdEntry);
            }

            if ((flags&FLAGS_HAS_AUTOFILL_DATA) != 0) {
                writeSensitive = mSanitized || !sanitizeOnWrite;
                out.writeInt(mSanitized ? 1 : 0);
@@ -887,6 +896,10 @@ public class AssistStructure implements Parcelable {
         * If {@link #getId()} is a resource identifier, this is the entry name of that
         * identifier.  See {@link android.view.ViewStructure#setId ViewStructure.setId}
         * for more information.
         *
         * <p>If the node represents a virtual view, it could also represent the entry id set by
         *  {@link android.view.ViewStructure#setIdEntry ViewStructure.setIdEntry}
         *
         */
        public String getIdEntry() {
            return mIdEntry;
@@ -1360,6 +1373,11 @@ public class AssistStructure implements Parcelable {
            mNode.mIdEntry = entryName;
        }

        @Override
        public void setIdEntry(String entryName) {
            mNode.mIdEntry = entryName;
        }

        @Override
        public void setDimens(int left, int top, int scrollX, int scrollY, int width, int height) {
            mNode.mX = left;
+11 −0
Original line number Diff line number Diff line
@@ -40,6 +40,17 @@ public abstract class ViewStructure {
     */
    public abstract void setId(int id, String packageName, String typeName, String entryName);

    /**
     * Sets the name of the identifier for this view.
     *
     * <p>Typically used when adding virtual children (through
     * {@link #asyncNewChild(int, int, int)}) that does not map to Android {@link View}
     * - otherwise, it's better to call {@link #setId(int, String, String, String)}.
     *
     * @param entryName The entry name of the view's identifier, or {@code null} if there is none.
     */
    public abstract void setIdEntry(String entryName);

    /**
     * Set the basic dimensions of this view.
     *
Loading