summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/ImsConfigurationTracker.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove ImsConfigTracker#onBindInput preconditionTaran Singh2022-03-091-2/+3
| | | | | | | | | | | | | | | It is expected the onIntialize() is called before onBindInput(), however it's not precisely known why onBindInput() is being called prior to onIntialize(). Once possibility is it could be that onDestory() is being called and init was skipped and call made it to onBindInput(). Replacing precondition with an early return should be safe here. Fix: 223083664 Bug: 223443508 Test: atest CtsInputMethodTestCases Change-Id: I8312d98b0349fbc661b6eb0f4c47bea25ffbb2a9
* Avoid IME restart for configChangesTaran Singh2021-03-301-0/+102
Handle onConfigurationChanged() in order to prevent restarting InputMethodService everytime. We introduce a new API attribute "configChanges" in InputMethod(attrs.xml) which when declared by IME, will be responsible for handling mentioned configuration changes. This CL re-introduces [1] with fix: Use new Configuration instance for IMS#mLastKnownConfig and also handle followup comments. [1] Ib94fddadb0dae648cf73a4c1642e51edebd19f50 Note: this change has no impact for devices not using DisplayAreas. Bug: 167948419 Test: atest InputMethodServiceTest Manually: 1. Patch Ie91e7a8e06b80864ef9409031e8543858552d70d to use dual display area. 2. Open applications with editors on both display areas. 3. Attach a debug point for IMS#onConfigurationChanged(). 4. Make sure IMS#resetStateForNewConfiguration() is not called when IME moves between these two identical DisplayAreas Also verify that bug 182604598 don't happen. Change-Id: I43b6b80cdb35410554412ee1d3b0917ee3198272