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

Commit c3a1914b authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Revert "Reduce the transaction fee of getEnabledInputMethodSubtypeList"

This reverts commit e9a6f971.

Change-Id: I611d31086d4f02aae5c7021ac92975bd92a59f34
parent e9a6f971
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -613,8 +613,7 @@ public final class InputMethodManager {
    public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(InputMethodInfo imi,
            boolean allowsImplicitlySelectedSubtypes) {
        try {
            return mService.getEnabledInputMethodSubtypeList(
                    imi == null ? null : imi.getId(), allowsImplicitlySelectedSubtypes);
            return mService.getEnabledInputMethodSubtypeList(imi, allowsImplicitlySelectedSubtypes);
        } catch (RemoteException e) {
            throw new RuntimeException(e);
        }
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ import com.android.internal.view.IInputMethodClient;
interface IInputMethodManager {
    List<InputMethodInfo> getInputMethodList();
    List<InputMethodInfo> getEnabledInputMethodList();
    List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in String imiId,
    List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in InputMethodInfo imi,
            boolean allowsImplicitlySelectedSubtypes);
    InputMethodSubtype getLastInputMethodSubtype();
    // TODO: We should change the return type from List to List<Parcelable>
+4 −10
Original line number Diff line number Diff line
@@ -969,25 +969,19 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    }

    /**
     * @param imiId if null, returns enabled subtypes for the current imi
     * @param imi if null, returns enabled subtypes for the current imi
     * @return enabled subtypes of the specified imi
     */
    @Override
    public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(String imiId,
    public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(InputMethodInfo imi,
            boolean allowsImplicitlySelectedSubtypes) {
        // TODO: Make this work even for non-current users?
        if (!calledFromValidUser()) {
            return Collections.<InputMethodSubtype>emptyList();
            return Collections.emptyList();
        }
        synchronized (mMethodMap) {
            final InputMethodInfo imi;
            if (imiId == null && mCurMethodId != null) {
            if (imi == null && mCurMethodId != null) {
                imi = mMethodMap.get(mCurMethodId);
            } else {
                imi = mMethodMap.get(imiId);
            }
            if (imi == null) {
                return Collections.<InputMethodSubtype>emptyList();
            }
            return mSettings.getEnabledInputMethodSubtypeListLocked(
                    mContext, imi, allowsImplicitlySelectedSubtypes);