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

Commit d2b9f0a1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix showSoftInput crashing when no IME is enabled" into tm-dev am: 00dcf266

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16974611

Change-Id: Ieea83acf11e4dd7e9337b1e6b7aaa3d7206865d4
parents 0f98c5c2 00dcf266
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -54,13 +54,11 @@ public final class ImeFocusController {

    @NonNull
    private InputMethodManagerDelegate getImmDelegate() {
        InputMethodManagerDelegate delegate = mDelegate;
        if (delegate != null) {
            return delegate;
        if (mDelegate == null) {
            mDelegate = mViewRootImpl.mContext.getSystemService(
                    InputMethodManager.class).getDelegate();
        }
        delegate = mViewRootImpl.mContext.getSystemService(InputMethodManager.class).getDelegate();
        mDelegate = delegate;
        return delegate;
        return mDelegate;
    }

    /** Called when the view root is moved to a different display. */
+5 −0
Original line number Diff line number Diff line
@@ -408,6 +408,11 @@ final class InputMethodBindingController {
    @GuardedBy("ImfLock.class")
    @NonNull
    InputBindResult bindCurrentMethod() {
        if (mSelectedMethodId == null) {
            Slog.e(TAG, "mSelectedMethodId is null!");
            return InputBindResult.NO_IME;
        }

        InputMethodInfo info = mMethodMap.get(mSelectedMethodId);
        if (info == null) {
            throw new IllegalArgumentException("Unknown id: " + mSelectedMethodId);