Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.
Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.
Bug: 158268939
Test: make target-java, make host-java
atest FrameworksNetIntegrationTests
atest FrameworksNetTests
make, device can boot,
atest CtsStrictJavaPackagesTestCases
wifi and mobile data work.
Change-Id: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
This commit is contained in:
@@ -59,6 +59,7 @@ android_test {
|
||||
"mockito-target-minus-junit4",
|
||||
"net-tests-utils",
|
||||
"platform-test-annotations",
|
||||
"service-connectivity",
|
||||
"services.core",
|
||||
"services.net",
|
||||
],
|
||||
|
||||
@@ -167,7 +167,7 @@ class ConnectivityServiceIntegrationTest {
|
||||
cm = ConnectivityManager(context, service)
|
||||
context.addMockSystemService(Context.CONNECTIVITY_SERVICE, cm)
|
||||
|
||||
service.systemReady()
|
||||
service.systemReadyInternal()
|
||||
}
|
||||
|
||||
private inner class TestConnectivityService(deps: Dependencies) : ConnectivityService(
|
||||
|
||||
@@ -1246,7 +1246,7 @@ public class ConnectivityServiceTest {
|
||||
// Create local CM before sending system ready so that we can answer
|
||||
// getSystemService() correctly.
|
||||
mCm = new WrappedConnectivityManager(InstrumentationRegistry.getContext(), mService);
|
||||
mService.systemReady();
|
||||
mService.systemReadyInternal();
|
||||
mockVpn(Process.myUid());
|
||||
mCm.bindProcessToNetwork(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user