Loading core/java/android/inputmethodservice/IInputMethodWrapper.java +14 −23 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -74,10 +74,6 @@ class IInputMethodWrapper extends IInputMethod.Stub 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; Loading Loading @@ -109,19 +105,14 @@ 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(); Loading Loading
core/java/android/inputmethodservice/IInputMethodWrapper.java +14 −23 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -74,10 +74,6 @@ class IInputMethodWrapper extends IInputMethod.Stub 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; Loading Loading @@ -109,19 +105,14 @@ 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(); Loading