Loading core/java/android/view/inputmethod/InputMethodManager.java +1 −4 Original line number Original line Diff line number Diff line Loading @@ -3106,10 +3106,7 @@ public final class InputMethodManager { matrixValues = new float[9]; matrixValues = new float[9]; matrix.getValues(matrixValues); matrix.getValues(matrixValues); } } final Completable.Void value = Completable.createVoid(); mService.reportActivityViewAsync(mClient, childDisplayId, matrixValues); mService.reportActivityView( mClient, childDisplayId, matrixValues, ResultCallbacks.of(value)); Completable.getResult(value); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } Loading core/java/com/android/internal/view/IInputMethodManager.aidl +2 −2 Original line number Original line Diff line number Diff line Loading @@ -88,8 +88,8 @@ interface IInputMethodManager { // TODO(Bug 113914148): Consider removing this. // TODO(Bug 113914148): Consider removing this. oneway void getInputMethodWindowVisibleHeight(IIntResultCallback resultCallback); oneway void getInputMethodWindowVisibleHeight(IIntResultCallback resultCallback); oneway void reportActivityView(in IInputMethodClient parentClient, int childDisplayId, oneway void reportActivityViewAsync(in IInputMethodClient parentClient, int childDisplayId, in float[] matrixValues, in IVoidResultCallback resultCallback); in float[] matrixValues); oneway void reportPerceptibleAsync(in IBinder windowToken, boolean perceptible); oneway void reportPerceptibleAsync(in IBinder windowToken, boolean perceptible); /** Remove the IME surface. Requires INTERNAL_SYSTEM_WINDOW permission. */ /** Remove the IME surface. Requires INTERNAL_SYSTEM_WINDOW permission. */ Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +11 −4 Original line number Original line Diff line number Diff line Loading @@ -4046,9 +4046,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } @Override @Override public void reportActivityView(IInputMethodClient parentClient, int childDisplayId, public void reportActivityViewAsync(IInputMethodClient parentClient, int childDisplayId, float[] matrixValues, IVoidResultCallback resultCallback) { float[] matrixValues) { CallbackUtils.onResult(resultCallback, () -> { try { final DisplayInfo displayInfo = mDisplayManagerInternal.getDisplayInfo(childDisplayId); final DisplayInfo displayInfo = mDisplayManagerInternal.getDisplayInfo(childDisplayId); if (displayInfo == null) { if (displayInfo == null) { throw new IllegalArgumentException( throw new IllegalArgumentException( Loading Loading @@ -4127,7 +4127,14 @@ public class InputMethodManagerService extends IInputMethodManager.Stub displayId = info.mParentClient.selfReportedDisplayId; displayId = info.mParentClient.selfReportedDisplayId; } } } } }); } catch (Throwable t) { if (parentClient != null) { try { parentClient.throwExceptionFromSystem(t.toString()); } catch (RemoteException e) { } } } } } @Override @Override Loading services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1864,10 +1864,9 @@ public final class MultiClientInputMethodManagerService { @BinderThread @BinderThread @Override @Override public void reportActivityView(IInputMethodClient parentClient, int childDisplayId, public void reportActivityViewAsync(IInputMethodClient parentClient, int childDisplayId, float[] matrixValues, IVoidResultCallback resultCallback) { float[] matrixValues) { reportNotSupported(); reportNotSupported(); CallbackUtils.onResult(resultCallback, () -> { }); } } @BinderThread @BinderThread Loading Loading
core/java/android/view/inputmethod/InputMethodManager.java +1 −4 Original line number Original line Diff line number Diff line Loading @@ -3106,10 +3106,7 @@ public final class InputMethodManager { matrixValues = new float[9]; matrixValues = new float[9]; matrix.getValues(matrixValues); matrix.getValues(matrixValues); } } final Completable.Void value = Completable.createVoid(); mService.reportActivityViewAsync(mClient, childDisplayId, matrixValues); mService.reportActivityView( mClient, childDisplayId, matrixValues, ResultCallbacks.of(value)); Completable.getResult(value); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } Loading
core/java/com/android/internal/view/IInputMethodManager.aidl +2 −2 Original line number Original line Diff line number Diff line Loading @@ -88,8 +88,8 @@ interface IInputMethodManager { // TODO(Bug 113914148): Consider removing this. // TODO(Bug 113914148): Consider removing this. oneway void getInputMethodWindowVisibleHeight(IIntResultCallback resultCallback); oneway void getInputMethodWindowVisibleHeight(IIntResultCallback resultCallback); oneway void reportActivityView(in IInputMethodClient parentClient, int childDisplayId, oneway void reportActivityViewAsync(in IInputMethodClient parentClient, int childDisplayId, in float[] matrixValues, in IVoidResultCallback resultCallback); in float[] matrixValues); oneway void reportPerceptibleAsync(in IBinder windowToken, boolean perceptible); oneway void reportPerceptibleAsync(in IBinder windowToken, boolean perceptible); /** Remove the IME surface. Requires INTERNAL_SYSTEM_WINDOW permission. */ /** Remove the IME surface. Requires INTERNAL_SYSTEM_WINDOW permission. */ Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +11 −4 Original line number Original line Diff line number Diff line Loading @@ -4046,9 +4046,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } @Override @Override public void reportActivityView(IInputMethodClient parentClient, int childDisplayId, public void reportActivityViewAsync(IInputMethodClient parentClient, int childDisplayId, float[] matrixValues, IVoidResultCallback resultCallback) { float[] matrixValues) { CallbackUtils.onResult(resultCallback, () -> { try { final DisplayInfo displayInfo = mDisplayManagerInternal.getDisplayInfo(childDisplayId); final DisplayInfo displayInfo = mDisplayManagerInternal.getDisplayInfo(childDisplayId); if (displayInfo == null) { if (displayInfo == null) { throw new IllegalArgumentException( throw new IllegalArgumentException( Loading Loading @@ -4127,7 +4127,14 @@ public class InputMethodManagerService extends IInputMethodManager.Stub displayId = info.mParentClient.selfReportedDisplayId; displayId = info.mParentClient.selfReportedDisplayId; } } } } }); } catch (Throwable t) { if (parentClient != null) { try { parentClient.throwExceptionFromSystem(t.toString()); } catch (RemoteException e) { } } } } } @Override @Override Loading
services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1864,10 +1864,9 @@ public final class MultiClientInputMethodManagerService { @BinderThread @BinderThread @Override @Override public void reportActivityView(IInputMethodClient parentClient, int childDisplayId, public void reportActivityViewAsync(IInputMethodClient parentClient, int childDisplayId, float[] matrixValues, IVoidResultCallback resultCallback) { float[] matrixValues) { reportNotSupported(); reportNotSupported(); CallbackUtils.onResult(resultCallback, () -> { }); } } @BinderThread @BinderThread Loading