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

Skip to content
Commit 31e46784 authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Add InputMethodManagerDelegate#getLockObject

As CL[1] introduces per-window based ImeFocusController for handling
the IME served view focus update logic.

However, for InputMethodManager APIs requires to access
ImeFocusController#{mServedView, mNextServedView} for starting the input
connection or checking the caller's validity, which needs a lock for
thread safety.

As a result, it would make sense to expose mH for ImeFocusController
through an new method InputMethodManagerDelegate#getLockObject
to protect the data consistancy during InputMethodMananger APIs
invoking to access the served view.

Also, renaming the methods (and update the javadoc) with "Locked" sufix:
- ImeFocusController#get{Served, NextServed}View
- ImeFocusController#set{Served, NextServed}View

Note that this is a refactoring preperation CL with added a TODO that
will use getLockObject in the follow-up CL.

[1]: Ib455704fe1e9d243f93190a84f230210dbceac2a

Bug: 244504062
Test: atest CtsInputMethodTestCases
Change-Id: I9c072b829d1db1e68b65e766d764ee71cb16e6a2
parent 4a8abca2
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