Fix a bug where autofill resends inline suggestions in the wrong app

* This is broken by ag/11443581 where we remove clearing the
  suggestions when view exit. The problem is that we cache the
  suggestions across onFinishInput/onStartInput events and resends
  the suggestions when autofill id matches. But the autofill id
  can be the same for different apps, so we ended up resending
  the old suggestion in the new app field with the same autofill id
  but doesn't have its own autofill suggestions.
* The fix is to clear the suggestions cache in the autofill side,
  but to avoid flickering the IME UI we don't send an empty response
  to the IME when observing ACTION_VIEW_EXITED

Test: atest android.autofillservice.cts.inline
Bug: 157174936

Change-Id: I156eecab3cae0b0684f3c5f5e0f852bf73e93a19
3 files changed