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
Loading
Please register or sign in to comment