+6
−6
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Update InputConnection#getTextBeforeCursor(int, int) and
InputConnection#getTextAfterCursor(int, int) API to
specify that the paramter {@code n} must be non-negative.
If the IME using the API incorrectly, throw
IllegalArgumentException.
Also update these two APIs that return nullable result (no
behaivor change). For editor App, return null for bad case.
Test: atest BaseInputConnectionTest#testInvalidGetTextBeforeOrAfterCursorRequest
Test: atest InputConnectionWrapperTest#testInvalidGetTextBeforeOrAfterCursorRequest
BUG: 169114026
Change-Id: I95169735198f8363c981a61e20234dfebfd645b1