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
Change-Id: I96d755445f6e1f88bb71a7d32742e87dae185250
This commit is contained in:
@@ -4548,9 +4548,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
|
||||
@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,
|
||||
|
||||
Reference in New Issue
Block a user