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

Commit d9003399 authored by Nikolas Havrikov's avatar Nikolas Havrikov
Browse files

Simplify getImmDelegate in ImeFocusController

This CL undoes part of [1] making removing a local variable.

[1]: Id4c85be1c0eab51f167ba00fc355386f852c424d

Test: make
Change-Id: I6b890e5536c17dd53722e2c3a781c85dd9d6bdf0
parent fe197a7d
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. */