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

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

Fix local Binder call scenario of IMMS#addClient()

This is a follow up CL to my previous CL [1] that enabled per-display
InputMethodManager (IMM) instance.

One thing I mistakenly assumed in my previous CL is that there is
always a process boundary between IMM#createRealInstance() and
IMMS#addClient(), which is not true when IMM is being instantiated in
the system server process.  This means that IMMS may associate an IME
client to wrong PID/UID/DisplayID when certain conditions are met.

With this CL, IMM#createRealInstance() always clears calling identity
so chat IMMS#addClient() can work correctly even for local Binder call
scenarios.

 [1]: I78ad7cccb9586474c83f7e2f90c0bcabb221c47b
      4052a10f

Bug: 115893206
Bug: 117594679
Fix: 118335706
Test: atest ActivityManagerMultiDisplayTests
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:android.view.inputmethod.InputMethodManagerTest
Test: Manually tested with manually simulating the problematic scenario
Change-Id: I318d32d8997b0acb4fb193fe46831bdc9a4dd083
parent f682b1a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment