Update the content capture text changed event merge logic
* This is only applicable when two consecutive CC events are
both TYPE_VIEW_TEXT_CHANGED event for the same view
* Before this change: we would merge if both events have
non-empty text. However, if the user types fast, CC will
not send the updates for individual word. Moreover, if the
user adds a word and then delete it fast, CC may not capture
the word since it'd be merged away.
* After this change, we change the criteria to consider whether
the current text has a ComposingSpan if it's a Spannable.
The logic is described in the code comment.
Bug: 181906241
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I08d447f557f7e48ef34c5a6241c497db3ce4c5fc
3 files changed