commit | 2e50cc9c29f97c03a5edc74c2a8cbd0c05ccbede | [log] [tgz] |
---|---|---|
author | Chalard Jean <jchalard@google.com> | Tue Jun 27 19:16:00 2023 +0900 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jun 30 03:18:01 2023 +0000 |
tree | feb9a98c952b113eda013fbe6ed152f0f8bffad2 | |
parent | 01a7d32071240b171b19dec5d9eef07787f99dc4 [diff] |
Never create native network immediately. This patch flags off the functionality added by aosp/2162425 in the wake of b/286649301 where a race in ConnectivityService breaks WiFi connectivity until reboot. Bug: 286649301 Test: NetworkAgentTest ConnectivityServiceTest (cherry picked from https://android-review.googlesource.com/q/commit:a16607f421ecfbf37ef8fb2fa96d4d285df9e77b) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1214b906463106d5a77f2da9a8bc49ddd868bd40) Merged-In: I96d755445f6e1f88bb71a7d32742e87dae185250 Change-Id: I96d755445f6e1f88bb71a7d32742e87dae185250
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java index 28d1d73..e6bc501 100755 --- a/service/src/com/android/server/ConnectivityService.java +++ b/service/src/com/android/server/ConnectivityService.java
@@ -4549,9 +4549,11 @@ @VisibleForTesting protected static boolean shouldCreateNetworksImmediately() { - // Before U, physical networks are only created when the agent advances to CONNECTED. - // In U and above, all networks are immediately created when the agent is registered. - return SdkLevel.isAtLeastU(); + // The feature of creating the networks immediately was slated for U, but race conditions + // detected late required this was flagged off. + // TODO : enable this in a Mainline update or in V, and re-enable the test for this + // in NetworkAgentTest. + return false; } private static boolean shouldCreateNativeNetwork(@NonNull NetworkAgentInfo nai,