Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16f76731 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Rethrow RemoteException from...

Merge "Rethrow RemoteException from IInputMethodManager#startInputOrWindowGainedFocus()" into sc-dev
parents 5c3cd507 71aca864
Loading
Loading
Loading
Loading
+34 −32
Original line number Diff line number Diff line
@@ -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,6 +2030,9 @@ public final class InputMethodManager {
                        view.getContext().getApplicationInfo().targetSdkVersion,
                        ResultCallbacks.of(value));
                res = Completable.getResult(value);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
            if (DEBUG) Log.v(TAG, "Starting input: Bind result=" + res);
            if (res == null) {
                Log.wtf(TAG, "startInputOrWindowGainedFocus must not return"
@@ -2057,9 +2062,6 @@ public final class InputMethodManager {
            if (mCurrentInputMethodSession != null && mCompletions != null) {
                mCurrentInputMethodSession.displayCompletions(mCompletions);
            }
            } catch (RemoteException e) {
                Log.w(TAG, "IME died: " + mCurId, e);
            }
        }

        // Notify the app that the InputConnection is initialized and ready for use.