diff options
| author | Lan Wei <azurewei@google.com> | 2020-10-29 16:16:46 +0800 |
|---|---|---|
| committer | Lan Wei <azurewei@google.com> | 2020-10-29 16:51:49 +0800 |
| commit | 1e72ef28933823594bf2b1993fed2d4895b20a67 (patch) | |
| tree | 12756020359ac70e11c681d2193020ad5cee52fe /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp | |
| parent | 64cd208bee81ee31306cf8d3c917efefd2a719e2 (diff) | |
Avoid bad InputConnection call crashing the app
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
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions
