Major refactoring on Autofill CTS timeouts.
Autofill uses timeouts in many places, specially for some UI operations. These
timeouts are already fine-tuned in multiple constants (so one operation that
requires a large timeout don't affect others), but still some of these values
are often not enough on different devices.
This CL refactors those timeouts in a "smart" Timeout class - which supports
exponential backup - and integrate them with RetryableException and RetryRule,
so the timeout is automatically increased on retryable errors.
This CL also fixes some other minor issues like wrong float comparisons on
EditDistanceScorerTest and missing view assertion on
FillEventHistoryTest.testEventsFromPreviousSessionIsDiscarded, and
disables DialogLauncherActivityTest#testAutofill_oneDataset (so its failure
doesn't increase the timeouts).
Test: atest CtsAutoFillServiceTestCases
Fixes: 69455052
Bug: 70790228
Bug: 37566627
Change-Id: Ie430fff6c0d36bc95253d327fa42be283b6ef2d5
40 files changed