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

Commit 779869ca authored by Raph Levien's avatar Raph Levien Committed by android-build-merger
Browse files

Merge "Make LocaleList constructor non-nullable" into nyc-dev am: 4d826831 am: c29bc443

am: 16e416ec

* commit '16e416ec':
  Make LocaleList constructor non-nullable

Change-Id: I4536dacdd94329f2ab8fecef6f5e868d6895b1fd
parents b525ef25 16e416ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -744,7 +744,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
    private void fixUpLocaleList() {
        if ((locale == null && !mLocaleList.isEmpty()) ||
                (locale != null && !locale.equals(mLocaleList.get(0)))) {
            mLocaleList = new LocaleList(locale);
            mLocaleList = locale == null ? LocaleList.getEmptyLocaleList() : new LocaleList(locale);
        }
    }

@@ -1481,7 +1481,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
     * @param loc The locale. Can be null.
     */
    public void setLocale(@Nullable Locale loc) {
        setLocales(new LocaleList(loc));
        setLocales(loc == null ? LocaleList.getEmptyLocaleList() : new LocaleList(loc));
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public class LocaleSpan extends MetricAffectingSpan implements ParcelableSpan {
     * @see #LocaleSpan(LocaleList)
     */
    public LocaleSpan(@Nullable Locale locale) {
        mLocales = new LocaleList(locale);
        mLocales = locale == null ? LocaleList.getEmptyLocaleList() : new LocaleList(locale);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -169,8 +169,8 @@ public final class LocaleList implements Parcelable {
     * @throws NullPointerException if any of the input locales is <code>null</code>.
     * @throws IllegalArgumentException if any of the input locales repeat.
     */
    public LocaleList(@Nullable Locale... list) {
        if (list == null || list.length == 0) {
    public LocaleList(@NonNull Locale... list) {
        if (list.length == 0) {
            mList = sEmptyList;
            mStringRepresentation = "";
        } else {