Let IC#requestCursorUpdates() fail for cross-display connections
Since Android Q [1], it is intentional that when an IME client app is running on a (virtual) display where IME should not be hosted, IME will be hosted in the default display instead. This means that cross-display App/IME interaction is an expected scenario now. The problem is that CursorAnchorInfo API, which I introduced in Android L [2], no longer works as intended in such a cross-display scenario, because screen coordinates make sense only within the same display. The ultimate fallback strategy for this problem is forcing InputConnection#requestCursorUpdates() to always return false for such a cross-display scenario, which is exactly what this CL does. In subsequent CLs, we aim to introduce a special handling logic for ActivityView, where the system may be able to keep maintaining sufficient display hierarchy information so that CursorAnchorInfo#getMatrix() can be automatically adjusted before it is passed to the IME. [1]: Iedd71e4ddf4983f90b02dd72e471e7fa8e838fbf ef1965bd [2]: I61dec2f8fa671ba891da1d4af08975750e3acb04 1c7e66c97ce0a5d54e03abdee2f36fdce55944e6 Bug: 115693908 Fix: 131368625 Test: atest MultiDisplaySystemDecorationTests#testCrossDisplayBasicImeOperations Change-Id: Ie2f7a5117cff3a13ad5c5806fd4b3abef7569549
Loading
Please register or sign in to comment