Fix ConnectivityManagerTest#testFactoryReset flaky

Listen SoftAp callback to make sure soft ap is disabled
before start hotspot.

Bug: 277856014
Test: atest ConnectivityManagerTest#testFactoryReset
(cherry picked from https://android-review.googlesource.com/q/commit:5fab2d6c17c4ecdd6673e882f53f29d2136a23b0)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:846032e9455640b534a57ab0175c81d951b35fdf)
Merged-In: I95050be703b7c97da7a14541ac74718fdcbd7f13
Change-Id: I95050be703b7c97da7a14541ac74718fdcbd7f13

Former-commit-id: 69e8617ac6
This commit is contained in:
Mark 2023-07-27 03:37:43 +00:00 committed by Android Build Coastguard Worker
parent 5da0a1d5c1
commit 20b25bd391
1 changed files with 1 additions and 0 deletions

View File

@ -2591,6 +2591,7 @@ public class ConnectivityManagerTest {
// prevent the race condition between airplane mode enabled and the followed
// up wifi tethering enabled.
tetherEventCallback.expectNoTetheringActive();
tetherUtils.expectSoftApDisabled();
// start wifi tethering
tetherUtils.startWifiTethering(tetherEventCallback);