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

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

Merge "Added LocaleList on ViewStructure."

parents fbd54b42 b4ca7018
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6599,6 +6599,7 @@ package android.app.assist {
    method public java.lang.String getIdType();
    method public int getInputType();
    method public int getLeft();
    method public android.os.LocaleList getLocaleList();
    method public int getScrollX();
    method public int getScrollY();
    method public java.lang.CharSequence getText();
@@ -46398,6 +46399,7 @@ package android.view {
    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 setLocaleList(android.os.LocaleList);
    method public abstract void setLongClickable(boolean);
    method public abstract void setOpaque(boolean);
    method public abstract void setSelected(boolean);
+2 −0
Original line number Diff line number Diff line
@@ -6834,6 +6834,7 @@ package android.app.assist {
    method public java.lang.String getIdType();
    method public int getInputType();
    method public int getLeft();
    method public android.os.LocaleList getLocaleList();
    method public int getScrollX();
    method public int getScrollY();
    method public java.lang.CharSequence getText();
@@ -49853,6 +49854,7 @@ package android.view {
    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 setLocaleList(android.os.LocaleList);
    method public abstract void setLongClickable(boolean);
    method public abstract void setOpaque(boolean);
    method public abstract void setSelected(boolean);
+2 −0
Original line number Diff line number Diff line
@@ -6626,6 +6626,7 @@ package android.app.assist {
    method public java.lang.String getIdType();
    method public int getInputType();
    method public int getLeft();
    method public android.os.LocaleList getLocaleList();
    method public int getScrollX();
    method public int getScrollY();
    method public java.lang.CharSequence getText();
@@ -46768,6 +46769,7 @@ package android.view {
    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 setLocaleList(android.os.LocaleList);
    method public abstract void setLongClickable(boolean);
    method public abstract void setOpaque(boolean);
    method public abstract void setSelected(boolean);
+28 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ import android.os.BadParcelableException;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.LocaleList;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.PooledStringReader;
@@ -641,6 +642,7 @@ public class AssistStructure implements Parcelable {
        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_HAS_LOCALE_LIST = 0x00010000;
        static final int FLAGS_ALL_CONTROL = 0xfff00000;

        int mFlags;
@@ -652,6 +654,7 @@ public class AssistStructure implements Parcelable {
        int mInputType;
        String mUrl;
        Bundle mExtras;
        LocaleList mLocaleList;

        ViewNode[] mChildren;

@@ -726,6 +729,9 @@ public class AssistStructure implements Parcelable {
            if ((flags&FLAGS_HAS_URL) != 0) {
                mUrl = in.readString();
            }
            if ((flags&FLAGS_HAS_LOCALE_LIST) != 0) {
                mLocaleList = in.readParcelable(null);
            }
            if ((flags&FLAGS_HAS_EXTRAS) != 0) {
                mExtras = in.readBundle();
            }
@@ -787,6 +793,9 @@ public class AssistStructure implements Parcelable {
            if (mUrl != null) {
                flags |= FLAGS_HAS_URL;
            }
            if (mLocaleList != null) {
                flags |= FLAGS_HAS_LOCALE_LIST;
            }
            if (mExtras != null) {
                flags |= FLAGS_HAS_EXTRAS;
            }
@@ -858,10 +867,12 @@ public class AssistStructure implements Parcelable {
            if ((flags&FLAGS_HAS_INPUT_TYPE) != 0) {
                out.writeInt(mInputType);
            }

            if ((flags&FLAGS_HAS_URL) != 0) {
                out.writeString(mUrl);
            }
            if ((flags&FLAGS_HAS_LOCALE_LIST) != 0) {
                out.writeParcelable(mLocaleList, 0);
            }
            if ((flags&FLAGS_HAS_EXTRAS) != 0) {
                out.writeBundle(mExtras);
            }
@@ -1237,6 +1248,13 @@ public class AssistStructure implements Parcelable {
            return mUrl;
        }

        /**
         * Returns the the list of locales associated with this node.
         */
        public LocaleList getLocaleList() {
            return mLocaleList;
        }

        /**
         * Returns any text associated with the node that is displayed to the user, or null
         * if there is none.
@@ -1688,6 +1706,11 @@ public class AssistStructure implements Parcelable {
        public void setUrl(String url) {
            mNode.mUrl = url;
        }

        @Override
        public void setLocaleList(LocaleList localeList) {
            mNode.mLocaleList = localeList;
        }
    }

    /** @hide */
@@ -1790,6 +1813,10 @@ public class AssistStructure implements Parcelable {
        if (url != null) {
            Log.i(TAG, prefix + "  URL: " + url);
        }
        LocaleList localeList = node.getLocaleList();
        if (localeList != null) {
            Log.i(TAG, prefix + "  LocaleList: " + localeList);
        }
        String hint = node.getHint();
        if (hint != null) {
            Log.i(TAG, prefix + "  Hint: " + hint);
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.LocaleList;
import android.view.autofill.AutofillId;
import android.view.autofill.AutofillValue;

@@ -380,4 +381,9 @@ public abstract class ViewStructure {
     * </ol>
     */
    public abstract void setUrl(String url);

    /**
     * Sets the the list of locales associated with this node.
     */
    public abstract void setLocaleList(LocaleList localeList);
}