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

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

Merge "Remove an unnecessary null check"

parents 46f57689 50148aea
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -645,7 +645,6 @@ final class InputMethodUtils {
                        if (imi != null && imi.getSubtypeCount() > 0) {
                            List<InputMethodSubtype> implicitlyEnabledSubtypes =
                                    SubtypeUtils.getImplicitlyApplicableSubtypesLocked(mRes, imi);
                            if (implicitlyEnabledSubtypes != null) {
                            final int numSubtypes = implicitlyEnabledSubtypes.size();
                            for (int i = 0; i < numSubtypes; ++i) {
                                final InputMethodSubtype st = implicitlyEnabledSubtypes.get(i);
@@ -654,7 +653,6 @@ final class InputMethodUtils {
                                }
                            }
                        }
                        }
                    } else {
                        for (String s: explicitlyEnabledSubtypes) {
                            if (s.equals(subtypeHashCode)) {
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.inputmethod;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.res.Resources;
import android.os.LocaleList;
@@ -123,6 +124,7 @@ final class SubtypeUtils {
            source -> source != null ? source.getLocaleObject() : null;

    @VisibleForTesting
    @NonNull
    static ArrayList<InputMethodSubtype> getImplicitlyApplicableSubtypesLocked(
            Resources res, InputMethodInfo imi) {
        final LocaleList systemLocales = res.getConfiguration().getLocales();