diff options
| author | Yohei Yukawa <yukawa@google.com> | 2017-10-18 20:19:33 -0700 |
|---|---|---|
| committer | Yohei Yukawa <yukawa@google.com> | 2017-10-18 20:19:33 -0700 |
| commit | 6f0bf747ebcf856272a8ebbc509d74e70d33bd31 (patch) | |
| tree | d8f6b07fc665f2cb17cdff0cfd9896fd0b56a77d /core/java/android/inputmethodservice/IInputMethodWrapper.java | |
| parent | 5cd47c904c7ea54d5311f5968dd0a454cfce86cc (diff) | |
No-op code cleanup for IInputMethodWrapper
This CL is a safe and no-op code clean-up, including dead code removal.
There should be no behavior change.
Test: continuous tests
Bug: 36897707
Change-Id: I4a1ad9cb764c7ba82b32e325c4a4b1c8e7296bbf
Diffstat (limited to 'core/java/android/inputmethodservice/IInputMethodWrapper.java')
| -rw-r--r-- | core/java/android/inputmethodservice/IInputMethodWrapper.java | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java index 765aff96c704..728d91fc0629 100644 --- a/core/java/android/inputmethodservice/IInputMethodWrapper.java +++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java @@ -16,14 +16,6 @@ package android.inputmethodservice; -import com.android.internal.os.HandlerCaller; -import com.android.internal.os.SomeArgs; -import com.android.internal.view.IInputContext; -import com.android.internal.view.IInputMethod; -import com.android.internal.view.IInputMethodSession; -import com.android.internal.view.IInputSessionCallback; -import com.android.internal.view.InputConnectionWrapper; - import android.content.Context; import android.content.pm.PackageManager; import android.os.Binder; @@ -41,6 +33,14 @@ import android.view.inputmethod.InputMethod; import android.view.inputmethod.InputMethodSession; import android.view.inputmethod.InputMethodSubtype; +import com.android.internal.os.HandlerCaller; +import com.android.internal.os.SomeArgs; +import com.android.internal.view.IInputContext; +import com.android.internal.view.IInputMethod; +import com.android.internal.view.IInputMethodSession; +import com.android.internal.view.IInputSessionCallback; +import com.android.internal.view.InputConnectionWrapper; + import java.io.FileDescriptor; import java.io.PrintWriter; import java.lang.ref.WeakReference; @@ -67,17 +67,13 @@ class IInputMethodWrapper extends IInputMethod.Stub private static final int DO_SHOW_SOFT_INPUT = 60; private static final int DO_HIDE_SOFT_INPUT = 70; private static final int DO_CHANGE_INPUTMETHOD_SUBTYPE = 80; - + final WeakReference<AbstractInputMethodService> mTarget; final Context mContext; final HandlerCaller mCaller; final WeakReference<InputMethod> mInputMethod; final int mTargetSdkVersion; - - static class Notifier { - boolean notified; - } - + // NOTE: we should have a cache of these. static final class InputMethodSessionCallbackWrapper implements InputMethod.SessionCallback { final Context mContext; @@ -108,20 +104,15 @@ class IInputMethodWrapper extends IInputMethod.Stub } } } - - public IInputMethodWrapper(AbstractInputMethodService context, - InputMethod inputMethod) { - mTarget = new WeakReference<AbstractInputMethodService>(context); + + public IInputMethodWrapper(AbstractInputMethodService context, InputMethod inputMethod) { + mTarget = new WeakReference<>(context); mContext = context.getApplicationContext(); mCaller = new HandlerCaller(mContext, null, this, true /*asyncHandler*/); - mInputMethod = new WeakReference<InputMethod>(inputMethod); + mInputMethod = new WeakReference<>(inputMethod); mTargetSdkVersion = context.getApplicationInfo().targetSdkVersion; } - public InputMethod getInternalInputMethod() { - return mInputMethod.get(); - } - @Override public void executeMessage(Message msg) { InputMethod inputMethod = mInputMethod.get(); |
