Refine the surrounding text copy logic
Our CL [1] used to copy the original surrounding text
in case the text is updated unexpectedly before the
surrounding text retrieval.
Refine the copy logic by:
-. Move copy action to the InitialSurroundingText constructor
-. Apply a deep copy with parcelable, it also avoid the text
span is updated later
[1] I6082a4cae2fcdc4c529dc14e2e5e7a45ab1aae4d
Bug: 160390184
Fixes: 163176179
Test: atest FrameworksCoreTests:EditorInfoTest
Test: atest CtsInputMethodTestCases:EditorInfoTest
Change-Id: I75edcf6046467f2776d62bb38137f9d15dbfab52
2 files changed