Improve how autofill service is enabled / disabled.
On Autofill tests, uses a latch to wait for settings update.
On Device Policy tests, uses the primary user since it's a cloned settings.
Fixes: 37659751
Bug: 37566627
Bug: 38033559
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedProfileOwnerTest#testDisallowAutofill_allowed
Test: cts-tradefed run commandAndExit cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDisallowAutofill_allowed
Change-Id: I05855cfb517c24f7aa8f0a1d409f96eaf86ec955
4 files changed