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

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

Merge "Optimize IMMS#setAdditionalInputMethodSubtypes() a bit for bg users"

parents d8d61664 9ddd4cd8
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -4186,12 +4186,15 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
                return;
            }

            final ArrayMap<String, InputMethodInfo> methodMap = queryMethodMapForUser(userId);
            final InputMethodSettings settings = new InputMethodSettings(mContext, methodMap,
                    userId, false);
            final ArrayMap<String, InputMethodInfo> methodMap = new ArrayMap<>();
            final ArrayList<InputMethodInfo> methodList = new ArrayList<>();
            final ArrayMap<String, List<InputMethodSubtype>> additionalSubtypeMap =
                    new ArrayMap<>();
            AdditionalSubtypeUtils.load(additionalSubtypeMap, userId);
            queryInputMethodServicesInternal(mContext, userId, additionalSubtypeMap, methodMap,
                    methodList, DirectBootAwareness.AUTO);
            final InputMethodSettings settings = new InputMethodSettings(mContext, methodMap,
                    userId, false);
            settings.setAdditionalInputMethodSubtypes(imiId, toBeAdded, additionalSubtypeMap,
                    mPackageManagerInternal, callingUid);
        }