Wait for validation of WiFi in OEM pref test

OEM_NETWORK_PREFERENCE_TEST prefers NOT_METERED&VALIDATED networks
then TEST networks. If the WiFi isn't validated by the time the
preference is set, then the TEST network is preferred and the test
fails. The best solution is simply to wait for the WiFi network to
validate before setting the preference.

Besides, some of the *wait* methods wait for validation and some
don't, creating confusion. Make this explicit on the
setWifiMeteredStatusAndWait method with a boolean argument, which
forces all users to make an explicit choice.

testSetOemNetworkPreferenceForTestOnlyPref is not affected, as
it does not change WiFi meteredness.

Ignore-AOSP-First: cherry-pick of an already-submitted AOSP change
Bug: 195365654
Test: testSetOemNetworkPreferenceForTestPref
Change-Id: I9f2bacd9b5433d7c907536af2f6c2653523271d2
Merged-In: Icb9d7ff1ca5c3d93286ea3a79c27f15630d17ee6
(cherry picked from commit ae4c414c1f8985fb19ed619eca42c50972e237cf)
1 file changed