[Mfill Android] Fix ViewPager timing issues

The ViewPager has timing issues that surface if any bottom sheet is
invoked very, very quickly after its creation.
I witnessed this approximately 1 out of 30 times when testing manually
and approximately 1 in 5 times in automated tests. As far as I know,
this test flakiness wasn't reported yet and the most affected test has
yet to land.

This CL posts a SetCurrentItem call right after it's regularly called.
That way, if there are no async issues, it will work as it should.
But if another SetCurrentItem marks the wrong item active, it will be
overridden very soon after.
Visually, the difference can (afaict) only be perceived during the very
first opening _if_ the wrong sheet would trigger. The flickering is not
perceivable unless expected (since the sheet is still opening at the
moment when the switch happens).

Bug: None
Change-Id: I2dcd7ab329746efed6aff294f2dbdb5657357a75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1624816
Reviewed-by: Ioana Pandele <ioanap@chromium.org>
Commit-Queue: Friedrich [CET] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662545}
1 file changed