IMM#hideSoftInputFromWindow: Post on handler thread if needed

Also, adding some more ImeTracker phases for better draggability in case of cancelling a request, because of missing the servedView, view's handler, or reposting to our thread.

Test: atest android.autofillservice.cts.dialog.LoginActivityTest#testShowFillDialog_onlyShowOnce
Fix: 374215831
Flag: android.view.inputmethod.refactor_insets_controller
Change-Id: I02e833561b89311a3fe3606e14fe6283efe5cb48
2 files changed