Simplify getImmDelegate in ImeFocusController
This CL undoes part of [1] making removing a local variable.
[1]: Id4c85be1c0eab51f167ba00fc355386f852c424d
Test: make
Change-Id: I6b890e5536c17dd53722e2c3a781c85dd9d6bdf0
(cherry picked from commit d90033999f)
Merged-In:I6b890e5536c17dd53722e2c3a781c85dd9d6bdf0
This commit is contained in:
committed by
Cherrypicker Worker
parent
1755df787d
commit
87d1af1d80
@@ -54,13 +54,11 @@ public final class ImeFocusController {
|
|||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private InputMethodManagerDelegate getImmDelegate() {
|
private InputMethodManagerDelegate getImmDelegate() {
|
||||||
InputMethodManagerDelegate delegate = mDelegate;
|
if (mDelegate == null) {
|
||||||
if (delegate != null) {
|
mDelegate = mViewRootImpl.mContext.getSystemService(
|
||||||
return delegate;
|
InputMethodManager.class).getDelegate();
|
||||||
}
|
}
|
||||||
delegate = mViewRootImpl.mContext.getSystemService(InputMethodManager.class).getDelegate();
|
return mDelegate;
|
||||||
mDelegate = delegate;
|
|
||||||
return delegate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called when the view root is moved to a different display. */
|
/** Called when the view root is moved to a different display. */
|
||||||
|
|||||||
Reference in New Issue
Block a user