Have connectivity self-register manager classes

As connectivity services are planned to move to a separate module, move
the manager classes registration from SystemServiceRegistry to
ConnectivityServicesRegistrar, using the registerContextAwareService
APIs.

This follows patterns and naming in WifiFrameworkInitializer.

Bug: 171540887
Test: device boots, connectivity working
Change-Id: I62ced1275750c73f209bac8ec3a3204b95695b83
This commit is contained in:
Remi NGUYEN VAN
2021-01-15 23:02:47 +09:00
parent fbbccbce69
commit 91444cae56
2 changed files with 105 additions and 0 deletions

View File

@@ -4823,6 +4823,28 @@ public class ConnectivityManager {
}
}
/** @hide */
public TestNetworkManager startOrGetTestNetworkManager() {
final IBinder tnBinder;
try {
tnBinder = mService.startOrGetTestNetworkService();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
return new TestNetworkManager(ITestNetworkManager.Stub.asInterface(tnBinder));
}
/** @hide */
public VpnManager createVpnManager() {
return new VpnManager(mContext, mService);
}
/** @hide */
public ConnectivityDiagnosticsManager createDiagnosticsManager() {
return new ConnectivityDiagnosticsManager(mContext, mService);
}
/**
* Simulates a Data Stall for the specified Network.
*