[automerger skipped] Merge "Fix app crash if the selection is from reverse direction." am: 769acc45e4 am: 93d64c8a1b -s ours

am skip reason: Change-Id I8dbc92f0f31e64b7e3a45ae91762e1b741629a8e with SHA-1 cb3c97db0c is in history

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

Change-Id: I8b0c0677d3b982c362d80e6d35e09a1d992b5197