summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Haoyu Zhang <haoyuchang@google.com> 2024-07-29 01:52:57 -0700
committer Haoyu Zhang <haoyuchang@google.com> 2024-08-01 19:19:48 -0700
commitf51becbf3aafaa92ba299b84f7eae42258c68073 (patch)
treeb05b9d372cb4375fe61ef579ef2c05d52da8a854 /libs/androidfw/StringPool.cpp
parent5d157ceeb2c760cca05d90fbf0f1877d0f8eebfe (diff)
Make the insert mode highlight sticky
This CL fixes the issue that in some Apps the insert mode highlight is applied to the entire text range after an editing. This is caused by App call text.replace(0, text.length(), newText) after each edit. Here the newText is usually a copy of text that has different spans. And Apps use this trick to update the spans on the text. However, it tricks the insert mode to think that the entire string is replaced. This Cl fixed the issue by making the highlight range sticky when the text replace range covers the highlight range. Bug: 355137282 Test: atest InsertModeTransformationMethod Flag: com.android.text.flags.insert_mode_highlight_range Change-Id: I46dd0f22db0287a51a6f8fda6ea2c8514c2e4b63
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions