diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-09-18 22:25:52 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-09-18 22:25:52 +0000 |
| commit | 173222142f788988fcaa46a7959752e84cd99759 (patch) | |
| tree | a7467db04630ac9ca614b5bdb7b67eeb8646ea1d /core/java/android/view/ViewRootImpl.java | |
| parent | 5ad852100873e1e3223120366b481538f0bcad47 (diff) | |
| parent | 484d4afc92cc1a1d58b601f7ad14d63781231b55 (diff) | |
Merge "Always use Context.getSystemService() to get IMM"
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 16d202b8af1d..2ee7ab939bd9 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2579,7 +2579,7 @@ public final class ViewRootImpl implements ViewParent, .mayUseInputMethod(mWindowAttributes.flags); if (imTarget != mLastWasImTarget) { mLastWasImTarget = imTarget; - InputMethodManager imm = InputMethodManager.peekInstance(); + InputMethodManager imm = mContext.getSystemService(InputMethodManager.class); if (imm != null && imTarget) { imm.onPreWindowFocus(mView, hasWindowFocus); imm.onPostWindowFocus(mView, mView.findFocus(), @@ -2695,7 +2695,7 @@ public final class ViewRootImpl implements ViewParent, mLastWasImTarget = WindowManager.LayoutParams .mayUseInputMethod(mWindowAttributes.flags); - InputMethodManager imm = InputMethodManager.peekInstance(); + InputMethodManager imm = mContext.getSystemService(InputMethodManager.class); if (imm != null && mLastWasImTarget && !isInLocalFocusMode()) { imm.onPreWindowFocus(mView, hasWindowFocus); } @@ -4329,7 +4329,7 @@ public final class ViewRootImpl implements ViewParent, enqueueInputEvent(event, null, 0, true); } break; case MSG_CHECK_FOCUS: { - InputMethodManager imm = InputMethodManager.peekInstance(); + InputMethodManager imm = mContext.getSystemService(InputMethodManager.class); if (imm != null) { imm.checkFocus(); } @@ -4871,7 +4871,7 @@ public final class ViewRootImpl implements ViewParent, @Override protected int onProcess(QueuedInputEvent q) { if (mLastWasImTarget && !isInLocalFocusMode()) { - InputMethodManager imm = InputMethodManager.peekInstance(); + InputMethodManager imm = mContext.getSystemService(InputMethodManager.class); if (imm != null) { final InputEvent event = q.mEvent; if (DEBUG_IMF) Log.v(mTag, "Sending input event to IME: " + event); |
