WifiManager.save() is an asynchronous operation. This is sometime causing the tests to be flaky (dropShellIdentity occurs while this is being processed). Use the synchronous legacy API's instead for rewinding the effects of factory reset. Bug: 152048238 Test: atest android.net.wifi.cts.WifiManagerTest Change-Id: Ibb0e04cf931511fcda1b1a81fd6eda4583196c2e