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

Polish InputMethodManagerService#startInputUncheckedLocked()

This CL aims to simplify logic recently added to IMMS to support
multiple displays (Bug 111364446).

With my previous CLs [1][2], now we can simply review what
InputMethodManagerService#startInputUncheckedLocked() is actually
doing.  Things we found and this CL does address are:

 1. Redundant if conditions against null IMMS#mCurMethodId.
 2. Timing to check IMMS#mSystemReady.
 3. Timing to check display id access
 4. Timing to update IMMS#mCurTokenDisplayId.
 5. Unnecessary complexity due to IMMS#mCurFocusedWindowClient, which
    is now guaranteed to equal to |cs| in that method.

Although this CL is not a mechanical safe refactroing, the new
behavior should be more efficient, solid and easier to maintain.

 [1]: I52f6c4cd1e02be3a59e9a87e33b0a44f4ba8d80b
      f91a2b10
 [2]: I71e259fa447dd06ff02b9ef8c958dc70bbce86ea
      caaa1d3d

Bug: 117730713
Test: atest ActivityManagerMultiDisplayTests
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:android.view.inputmethod.InputMethodManagerTest
Change-Id: Ic9232d9c3ec9802101df5f0bc511c55465b5bbe6
parent caaa1d3d
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