Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 445ee3c0 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Fix testGetSurroundingTextFailWithNegative{Before,After}LengthForA11y

This is a follow up CL to my previous CLs[1][2], which are submitted
almost at the same time but not compatible with each other.

The first CL [1] introduced a new behavior that negative indices
passed to

  AccessibilityInputConnection#getSurroundingText(int, int, int)

result in IllegalArgumentException, which is a different behavior than
what's observed from IMEs.

The second CL [2] assumed that negative indices passed to that API
result in just receiving null result like what's observed from IMEs.

This CL effectively reverts the new behavior introduced in the first
CL [1] to keep two observable behaviors consistent.

Note that negative indices passed to getSurroundingText() are already
handled in

  RemoteInputConnectionImpl#getSurroundingText()

in a graceful manner [3], which guarantees that the IME client process
will not see such an irregular parameter (Bug 169114026) with keeping
the InputConnection commands order (Bug 194110780).

 [1]: I5ff2e804cbcf90828370a0612ff54111130bdff4
      c60176c1
 [2]: I62b80916369bdac981dc93c14dcaedc1f2b6e95f
      495ac0f55cbcc976995e8c73fdc89babfbdce902
 [3]: Ie0c18d0c9b8bf8f02f2fcdca5aac7e580c6bf2cd
      8821afef

Bug: 215633021
Fix: 229981360
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Change-Id: I16a0185343c7c7c3e0947aab2c398714a1077b97
parent e1be2353
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment