Merge "Fix ANR when switching the app task but IME selection dialog focused" into sc-dev am: 1181f3e9aa

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

Change-Id: I9ecb5979590186724a8564dddd73d3256747a074