diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-03-23 20:49:38 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-03-23 20:49:38 +0000 |
| commit | 16f767310a482b5b655e76813a9e800f31758183 (patch) | |
| tree | 6cc2355cbc32d67b65eddf0b557aed56273b263a /core/java/android | |
| parent | 5c3cd50754aa747ff872bd7169459e253273179c (diff) | |
| parent | 71aca864c28d2460f24c7f87e0c92f93ec08a454 (diff) | |
Merge "Rethrow RemoteException from IInputMethodManager#startInputOrWindowGainedFocus()" into sc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/inputmethod/InputMethodManager.java | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 3cd39021685d..6edd07178ed3 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -2017,10 +2017,12 @@ public final class InputMethodManager { } mServedInputConnectionWrapper = servedContext; - try { - if (DEBUG) Log.v(TAG, "START INPUT: view=" + dumpViewInfo(view) + " ic=" + if (DEBUG) { + Log.v(TAG, "START INPUT: view=" + dumpViewInfo(view) + " ic=" + ic + " tba=" + tba + " startInputFlags=" + InputMethodDebug.startInputFlagsToString(startInputFlags)); + } + try { final Completable.InputBindResult value = Completable.createInputBindResult(); mService.startInputOrWindowGainedFocus( startInputReason, mClient, windowGainingFocus, startInputFlags, @@ -2028,37 +2030,37 @@ public final class InputMethodManager { view.getContext().getApplicationInfo().targetSdkVersion, ResultCallbacks.of(value)); res = Completable.getResult(value); - if (DEBUG) Log.v(TAG, "Starting input: Bind result=" + res); - if (res == null) { - Log.wtf(TAG, "startInputOrWindowGainedFocus must not return" - + " null. startInputReason=" - + InputMethodDebug.startInputReasonToString(startInputReason) - + " editorInfo=" + tba - + " startInputFlags=" - + InputMethodDebug.startInputFlagsToString(startInputFlags)); - return false; - } - mActivityViewToScreenMatrix = res.getActivityViewToScreenMatrix(); - mIsInputMethodSuppressingSpellChecker = res.isInputMethodSuppressingSpellChecker; - if (res.id != null) { - setInputChannelLocked(res.channel); - mBindSequence = res.sequence; - mCurMethod = res.method; // for @UnsupportedAppUsage - mCurrentInputMethodSession = InputMethodSessionWrapper.createOrNull(res.method); - mCurId = res.id; - } else if (res.channel != null && res.channel != mCurChannel) { - res.channel.dispose(); - } - switch (res.result) { - case InputBindResult.ResultCode.ERROR_NOT_IME_TARGET_WINDOW: - mRestartOnNextWindowFocus = true; - break; - } - if (mCurrentInputMethodSession != null && mCompletions != null) { - mCurrentInputMethodSession.displayCompletions(mCompletions); - } } catch (RemoteException e) { - Log.w(TAG, "IME died: " + mCurId, e); + throw e.rethrowFromSystemServer(); + } + if (DEBUG) Log.v(TAG, "Starting input: Bind result=" + res); + if (res == null) { + Log.wtf(TAG, "startInputOrWindowGainedFocus must not return" + + " null. startInputReason=" + + InputMethodDebug.startInputReasonToString(startInputReason) + + " editorInfo=" + tba + + " startInputFlags=" + + InputMethodDebug.startInputFlagsToString(startInputFlags)); + return false; + } + mActivityViewToScreenMatrix = res.getActivityViewToScreenMatrix(); + mIsInputMethodSuppressingSpellChecker = res.isInputMethodSuppressingSpellChecker; + if (res.id != null) { + setInputChannelLocked(res.channel); + mBindSequence = res.sequence; + mCurMethod = res.method; // for @UnsupportedAppUsage + mCurrentInputMethodSession = InputMethodSessionWrapper.createOrNull(res.method); + mCurId = res.id; + } else if (res.channel != null && res.channel != mCurChannel) { + res.channel.dispose(); + } + switch (res.result) { + case InputBindResult.ResultCode.ERROR_NOT_IME_TARGET_WINDOW: + mRestartOnNextWindowFocus = true; + break; + } + if (mCurrentInputMethodSession != null && mCompletions != null) { + mCurrentInputMethodSession.displayCompletions(mCompletions); } } |
