Merge "Prevent exception when surrounding text retrieval" into rvc-dev am: 309cfa3431 am: f4fb8c1457

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12167896

Change-Id: I1b7446f698daabf5eae3039fa91efeccd111f1a9