[Mfill Android] Prevent keyboard opening when autofill UI dies

Before this change, the filling UI would open the keyboard when autofill
UI was destroyed. This is usually invisible since the whole page closes
usually when that happens. In rare cases, that happens earlier (e.g. the
linked bug where a navigation is stopped by confirmation).

With this change, the filling UI will hide if a source that populates it
disappears but trigger an opening animation. Net effect: open UIs are
closed when the last relevant source disappeared but remain untouched
otherwise.

Bug: 983421
Change-Id: I4f6aed2012069670f789ccaf73f70b3ce442511c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702243
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Friedrich [CET] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677692}
2 files changed