Skip to content
Commit 71aca864 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Rethrow RemoteException from IInputMethodManager#startInputOrWindowGainedFocus()

This is a relatively safe code clean up as a follow up of our recent
CL [1], which introduced InputMethodSessionWrapper for better
readability and maintainability.

Before that CL, it wasn't obvious that our try/catch block in

  InputMethodMnager#startInputInner()

was actually taking care of not only RemoteException from

  IInputMethodSession#displayCompletions()

but also from RemoteException from

  IInputMethodManager#startInputOrWindowGainedFocus()

Now that the former is taken care inside InputMethodSessionWrapper,
this CL tries to further simplify and clean up it.

One potential behavior change is that with this CL the calling app
starts crashing when Binder driver throws RemoteException while
calling one-way Binder IPC

  IInputMethodManager#startInputOrWindowGainedFocus()

Note that Completable.getResult(value) has already been rethrowing an
Exception when InputMethodManagerService explicitly throws an
exception since we rewrote the logic with our hand-written Completable
[2], which is indeed more likely to happpen.  Thus hopefully having
the same behavior for errors from Binder driver would be acceptable
and make it easier for us to detect something unexpected is happening.

Other than that, there should be no observable behavior change.

 [1]: Ifb4f86098011fe74cf4159446106d6c15c30fa30
      17827d75
 [2]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1

Bug: 167948374
Test: atest CtsInputMethodTestCases
Test: atest CtsInputMethodTestCases --instant
Change-Id: I2cc879ba4a02cc9cf0f97c8380fe33c358e3d120
parent 5785c5c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment