Loading core/java/android/inputmethodservice/RemoteInputConnection.java +10 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,16 @@ import com.android.internal.view.IInputMethod; import java.lang.ref.WeakReference; /** * Takes care of remote method invocations of {@link InputConnection} in the IME side. * * <p>This class works as a proxy to forward API calls on {@link InputConnection} to * {@link com.android.internal.inputmethod.RemoteInputConnectionImpl} running on the IME client * (editor app) process then waits replies as needed.</p> * * <p>See also {@link IInputContext} for the actual {@link android.os.Binder} IPC protocols under * the hood.</p> */ final class RemoteInputConnection implements InputConnection { private static final String TAG = "RemoteInputConnection"; Loading core/java/android/view/inputmethod/InputMethodManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -90,12 +90,12 @@ import com.android.internal.inputmethod.ImeTracing; import com.android.internal.inputmethod.InputBindResult; import com.android.internal.inputmethod.InputMethodDebug; import com.android.internal.inputmethod.InputMethodPrivilegedOperationsRegistry; import com.android.internal.inputmethod.RemoteInputConnectionImpl; import com.android.internal.inputmethod.SoftInputShowHideReason; import com.android.internal.inputmethod.StartInputFlags; import com.android.internal.inputmethod.StartInputReason; import com.android.internal.inputmethod.UnbindReason; import com.android.internal.os.SomeArgs; import com.android.internal.view.IInputConnectionWrapper; import com.android.internal.view.IInputMethodClient; import com.android.internal.view.IInputMethodManager; import com.android.internal.view.IInputMethodSession; Loading Loading @@ -365,7 +365,7 @@ public final class InputMethodManager { final H mH; // Our generic input connection if the current target does not have its own. private final IInputConnectionWrapper mFallbackInputConnection; private final RemoteInputConnectionImpl mFallbackInputConnection; private final int mDisplayId; Loading Loading @@ -407,7 +407,7 @@ public final class InputMethodManager { /** * The InputConnection that was last retrieved from the served view. */ IInputConnectionWrapper mServedInputConnection; RemoteInputConnectionImpl mServedInputConnection; /** * The completions that were last provided by the served view. */ Loading Loading @@ -1120,7 +1120,7 @@ public final class InputMethodManager { mMainLooper = looper; mH = new H(looper); mDisplayId = displayId; mFallbackInputConnection = new IInputConnectionWrapper(looper, mFallbackInputConnection = new RemoteInputConnectionImpl(looper, new BaseInputConnection(this, false), this, null); } Loading Loading @@ -1938,7 +1938,7 @@ public final class InputMethodManager { mServedInputConnection.deactivate(); mServedInputConnection = null; } IInputConnectionWrapper servedInputConnection; RemoteInputConnectionImpl servedInputConnection; final int missingMethodFlags; if (ic != null) { mCursorSelStart = tba.initialSelStart; Loading @@ -1955,7 +1955,7 @@ public final class InputMethodManager { } else { icHandler = ic.getHandler(); } servedInputConnection = new IInputConnectionWrapper( servedInputConnection = new RemoteInputConnectionImpl( icHandler != null ? icHandler.getLooper() : vh.getLooper(), ic, this, view); } else { servedInputConnection = null; Loading core/java/com/android/internal/view/IInputConnectionWrapper.java→core/java/com/android/internal/inputmethod/RemoteInputConnectionImpl.java +12 −12 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.view; package com.android.internal.inputmethod; import android.annotation.NonNull; import android.annotation.Nullable; Loading @@ -40,21 +40,21 @@ import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.SurroundingText; import com.android.internal.annotations.GuardedBy; import com.android.internal.inputmethod.IBooleanResultCallback; import com.android.internal.inputmethod.ICharSequenceResultCallback; import com.android.internal.inputmethod.IExtractedTextResultCallback; import com.android.internal.inputmethod.IIntResultCallback; import com.android.internal.inputmethod.ISurroundingTextResultCallback; import com.android.internal.inputmethod.ImeTracing; import com.android.internal.inputmethod.InputConnectionProtoDumper; import com.android.internal.view.IInputContext; import java.lang.ref.WeakReference; /** * Takes care of remote method invocations of {@link InputConnection} in the IME client side. * * <p>{@link android.inputmethodservice.RemoteInputConnection} code is executed in the IME process. * It makes IInputContext binder calls under the hood. {@link RemoteInputConnectionImpl} receives * {@link IInputContext} binder calls in the IME client (editor app) process, and forwards them to * {@link InputConnection} that the IME client provided, on the {@link Looper} associated to the * {@link InputConnection}.</p> */ public final class IInputConnectionWrapper extends IInputContext.Stub { private static final String TAG = "IInputConnectionWrapper"; public final class RemoteInputConnectionImpl extends IInputContext.Stub { private static final String TAG = "RemoteInputConnectionImpl"; private static final boolean DEBUG = false; @GuardedBy("mLock") Loading @@ -72,7 +72,7 @@ public final class IInputConnectionWrapper extends IInputContext.Stub { private final InputMethodManager mParentInputMethodManager; private final WeakReference<View> mServedView; public IInputConnectionWrapper(@NonNull Looper looper, public RemoteInputConnectionImpl(@NonNull Looper looper, @NonNull InputConnection inputConnection, @NonNull InputMethodManager inputMethodManager, @Nullable View servedView) { mInputConnection = inputConnection; Loading Loading @@ -140,7 +140,7 @@ public final class IInputConnectionWrapper extends IInputContext.Stub { @Override public String toString() { return "IInputConnectionWrapper{" return "RemoteInputConnectionImpl{" + "connection=" + getInputConnection() + " finished=" + isFinished() + " mParentInputMethodManager.isActive()=" + mParentInputMethodManager.isActive() Loading Loading
core/java/android/inputmethodservice/RemoteInputConnection.java +10 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,16 @@ import com.android.internal.view.IInputMethod; import java.lang.ref.WeakReference; /** * Takes care of remote method invocations of {@link InputConnection} in the IME side. * * <p>This class works as a proxy to forward API calls on {@link InputConnection} to * {@link com.android.internal.inputmethod.RemoteInputConnectionImpl} running on the IME client * (editor app) process then waits replies as needed.</p> * * <p>See also {@link IInputContext} for the actual {@link android.os.Binder} IPC protocols under * the hood.</p> */ final class RemoteInputConnection implements InputConnection { private static final String TAG = "RemoteInputConnection"; Loading
core/java/android/view/inputmethod/InputMethodManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -90,12 +90,12 @@ import com.android.internal.inputmethod.ImeTracing; import com.android.internal.inputmethod.InputBindResult; import com.android.internal.inputmethod.InputMethodDebug; import com.android.internal.inputmethod.InputMethodPrivilegedOperationsRegistry; import com.android.internal.inputmethod.RemoteInputConnectionImpl; import com.android.internal.inputmethod.SoftInputShowHideReason; import com.android.internal.inputmethod.StartInputFlags; import com.android.internal.inputmethod.StartInputReason; import com.android.internal.inputmethod.UnbindReason; import com.android.internal.os.SomeArgs; import com.android.internal.view.IInputConnectionWrapper; import com.android.internal.view.IInputMethodClient; import com.android.internal.view.IInputMethodManager; import com.android.internal.view.IInputMethodSession; Loading Loading @@ -365,7 +365,7 @@ public final class InputMethodManager { final H mH; // Our generic input connection if the current target does not have its own. private final IInputConnectionWrapper mFallbackInputConnection; private final RemoteInputConnectionImpl mFallbackInputConnection; private final int mDisplayId; Loading Loading @@ -407,7 +407,7 @@ public final class InputMethodManager { /** * The InputConnection that was last retrieved from the served view. */ IInputConnectionWrapper mServedInputConnection; RemoteInputConnectionImpl mServedInputConnection; /** * The completions that were last provided by the served view. */ Loading Loading @@ -1120,7 +1120,7 @@ public final class InputMethodManager { mMainLooper = looper; mH = new H(looper); mDisplayId = displayId; mFallbackInputConnection = new IInputConnectionWrapper(looper, mFallbackInputConnection = new RemoteInputConnectionImpl(looper, new BaseInputConnection(this, false), this, null); } Loading Loading @@ -1938,7 +1938,7 @@ public final class InputMethodManager { mServedInputConnection.deactivate(); mServedInputConnection = null; } IInputConnectionWrapper servedInputConnection; RemoteInputConnectionImpl servedInputConnection; final int missingMethodFlags; if (ic != null) { mCursorSelStart = tba.initialSelStart; Loading @@ -1955,7 +1955,7 @@ public final class InputMethodManager { } else { icHandler = ic.getHandler(); } servedInputConnection = new IInputConnectionWrapper( servedInputConnection = new RemoteInputConnectionImpl( icHandler != null ? icHandler.getLooper() : vh.getLooper(), ic, this, view); } else { servedInputConnection = null; Loading
core/java/com/android/internal/view/IInputConnectionWrapper.java→core/java/com/android/internal/inputmethod/RemoteInputConnectionImpl.java +12 −12 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ package com.android.internal.view; package com.android.internal.inputmethod; import android.annotation.NonNull; import android.annotation.Nullable; Loading @@ -40,21 +40,21 @@ import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.SurroundingText; import com.android.internal.annotations.GuardedBy; import com.android.internal.inputmethod.IBooleanResultCallback; import com.android.internal.inputmethod.ICharSequenceResultCallback; import com.android.internal.inputmethod.IExtractedTextResultCallback; import com.android.internal.inputmethod.IIntResultCallback; import com.android.internal.inputmethod.ISurroundingTextResultCallback; import com.android.internal.inputmethod.ImeTracing; import com.android.internal.inputmethod.InputConnectionProtoDumper; import com.android.internal.view.IInputContext; import java.lang.ref.WeakReference; /** * Takes care of remote method invocations of {@link InputConnection} in the IME client side. * * <p>{@link android.inputmethodservice.RemoteInputConnection} code is executed in the IME process. * It makes IInputContext binder calls under the hood. {@link RemoteInputConnectionImpl} receives * {@link IInputContext} binder calls in the IME client (editor app) process, and forwards them to * {@link InputConnection} that the IME client provided, on the {@link Looper} associated to the * {@link InputConnection}.</p> */ public final class IInputConnectionWrapper extends IInputContext.Stub { private static final String TAG = "IInputConnectionWrapper"; public final class RemoteInputConnectionImpl extends IInputContext.Stub { private static final String TAG = "RemoteInputConnectionImpl"; private static final boolean DEBUG = false; @GuardedBy("mLock") Loading @@ -72,7 +72,7 @@ public final class IInputConnectionWrapper extends IInputContext.Stub { private final InputMethodManager mParentInputMethodManager; private final WeakReference<View> mServedView; public IInputConnectionWrapper(@NonNull Looper looper, public RemoteInputConnectionImpl(@NonNull Looper looper, @NonNull InputConnection inputConnection, @NonNull InputMethodManager inputMethodManager, @Nullable View servedView) { mInputConnection = inputConnection; Loading Loading @@ -140,7 +140,7 @@ public final class IInputConnectionWrapper extends IInputContext.Stub { @Override public String toString() { return "IInputConnectionWrapper{" return "RemoteInputConnectionImpl{" + "connection=" + getInputConnection() + " finished=" + isFinished() + " mParentInputMethodManager.isActive()=" + mParentInputMethodManager.isActive() Loading