diff options
| author | Wilson Wu <wilsonwu@google.com> | 2021-01-28 01:46:32 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-01-28 01:46:32 +0000 |
| commit | 299897e9baf78b9c0dc1d1007fea74efcbaa6137 (patch) | |
| tree | c8be67f666a622d1a154e5d22c24a30d2e36710f /core/java | |
| parent | 7763adabbd82efbf6f944b519ab134fd2145a43e (diff) | |
| parent | c4663ba6a98c93c305778af2d7770d3cfa7d345a (diff) | |
Merge "Make IInputMethodManager to oneway (10/N)" into sc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/inputmethod/InputMethodManager.java | 8 | ||||
| -rw-r--r-- | core/java/com/android/internal/view/IInputMethodManager.aidl | 42 |
2 files changed, 29 insertions, 21 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 5140c09dc323..90c8e17a6984 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -2307,7 +2307,9 @@ public final class InputMethodManager { public void removeImeSurface(IBinder windowToken) { synchronized (mH) { try { - mService.removeImeSurfaceFromWindow(windowToken); + final Completable.Void value = Completable.createVoid(); + mService.removeImeSurfaceFromWindow(windowToken, ResultCallbacks.of(value)); + Completable.getResult(value); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -3239,7 +3241,9 @@ public final class InputMethodManager { @Deprecated public void setAdditionalInputMethodSubtypes(String imiId, InputMethodSubtype[] subtypes) { try { - mService.setAdditionalInputMethodSubtypes(imiId, subtypes); + final Completable.Void value = Completable.createVoid(); + mService.setAdditionalInputMethodSubtypes(imiId, subtypes, ResultCallbacks.of(value)); + Completable.getResult(value); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl index b42404fb6d56..892c5a53527b 100644 --- a/core/java/com/android/internal/view/IInputMethodManager.aidl +++ b/core/java/com/android/internal/view/IInputMethodManager.aidl @@ -41,22 +41,24 @@ interface IInputMethodManager { int untrustedDisplayId); // TODO: Use ParceledListSlice instead - void getInputMethodList(int userId, in IInputMethodInfoListResultCallback resultCallback); + oneway void getInputMethodList(int userId, + in IInputMethodInfoListResultCallback resultCallback); // TODO: Use ParceledListSlice instead - void getEnabledInputMethodList(int userId, + oneway void getEnabledInputMethodList(int userId, in IInputMethodInfoListResultCallback resultCallback); - void getEnabledInputMethodSubtypeList(in String imiId, boolean allowsImplicitlySelectedSubtypes, + oneway void getEnabledInputMethodSubtypeList(in String imiId, + boolean allowsImplicitlySelectedSubtypes, in IInputMethodSubtypeListResultCallback resultCallback); - void getLastInputMethodSubtype(in IInputMethodSubtypeResultCallback resultCallback); + oneway void getLastInputMethodSubtype(in IInputMethodSubtypeResultCallback resultCallback); - void showSoftInput(in IInputMethodClient client, IBinder windowToken, int flags, + oneway void showSoftInput(in IInputMethodClient client, IBinder windowToken, int flags, in ResultReceiver resultReceiver, in IBooleanResultCallback resultCallback); - void hideSoftInput(in IInputMethodClient client, IBinder windowToken, int flags, + oneway void hideSoftInput(in IInputMethodClient client, IBinder windowToken, int flags, in ResultReceiver resultReceiver, in IBooleanResultCallback resultCallback); // If windowToken is null, this just does startInput(). Otherwise this reports that a window // has gained focus, and if 'attribute' is non-null then also does startInput. // @NonNull - void startInputOrWindowGainedFocus( + oneway void startInputOrWindowGainedFocus( /* @StartInputReason */ int startInputReason, in IInputMethodClient client, in IBinder windowToken, /* @StartInputFlags */ int startInputFlags, @@ -66,29 +68,31 @@ interface IInputMethodManager { int unverifiedTargetSdkVersion, in IInputBindResultResultCallback inputBindResult); - void showInputMethodPickerFromClient(in IInputMethodClient client, + oneway void showInputMethodPickerFromClient(in IInputMethodClient client, int auxiliarySubtypeMode, in IVoidResultCallback resultCallback); - void showInputMethodPickerFromSystem(in IInputMethodClient client, int auxiliarySubtypeMode, - int displayId, in IVoidResultCallback resultCallback); - void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId, + oneway void showInputMethodPickerFromSystem(in IInputMethodClient client, + int auxiliarySubtypeMode, int displayId, in IVoidResultCallback resultCallback); + oneway void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, + String topId, in IVoidResultCallback resultCallback); + oneway void isInputMethodPickerShownForTest(in IBooleanResultCallback resultCallback); + oneway void getCurrentInputMethodSubtype(in IInputMethodSubtypeResultCallback resultCallback); + oneway void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes, in IVoidResultCallback resultCallback); - void isInputMethodPickerShownForTest(in IBooleanResultCallback resultCallback); - void getCurrentInputMethodSubtype(in IInputMethodSubtypeResultCallback resultCallback); - void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes); // This is kept due to @UnsupportedAppUsage. // TODO(Bug 113914148): Consider removing this. - void getInputMethodWindowVisibleHeight(IIntResultCallback resultCallback); + oneway void getInputMethodWindowVisibleHeight(IIntResultCallback resultCallback); - void reportActivityView(in IInputMethodClient parentClient, int childDisplayId, + oneway void reportActivityView(in IInputMethodClient parentClient, int childDisplayId, in float[] matrixValues, in IVoidResultCallback resultCallback); oneway void reportPerceptible(in IBinder windowToken, boolean perceptible); /** Remove the IME surface. Requires INTERNAL_SYSTEM_WINDOW permission. */ - void removeImeSurface(); + oneway void removeImeSurface(in IVoidResultCallback resultCallback); /** Remove the IME surface. Requires passing the currently focused window. */ - void removeImeSurfaceFromWindow(in IBinder windowToken); + oneway void removeImeSurfaceFromWindow(in IBinder windowToken, + in IVoidResultCallback resultCallback); void startProtoDump(in byte[] protoDump, int source, String where); - void isImeTraceEnabled(in IBooleanResultCallback resultCallback); + oneway void isImeTraceEnabled(in IBooleanResultCallback resultCallback); // Starts an ime trace. void startImeTrace(); |
