summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/SystemServer.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2021-01-08 01:19:44 +0000
committerRemi NGUYEN VAN <reminv@google.com>2021-01-08 01:23:36 +0000
commit86a4035283d21b1e05a435d2dec2bd51001856e7 (patch)
treec266c204c1385d39e0d70dea691b5bc250a1c6eb /services/java/com/android/server/SystemServer.java
parent082bcc67e724d83e22ae3b60eaada5b8dc97706f (diff)
Revert^2 "Move service-connectivity to the tethering APEX"
As part of modularization of ConnectivityService and expansion of the Tethering module scope, move service-connectivity.jar into the tethering APEX, and load it from there. This rolls forward the change. The original topic was reverted because of a bad merged-in clause; this is fixed and re-verified in this topic. Bug: 171540887 Test: m, device boots and connectivity Change-Id: I293b09c0dc04c6ccafa30cd0f1a63efe32283604
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r--services/java/com/android/server/SystemServer.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index b5c5bb52d050..d55a5b7792d4 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -221,6 +221,8 @@ public final class SystemServer {
"com.android.server.companion.CompanionDeviceManagerService";
private static final String STATS_COMPANION_APEX_PATH =
"/apex/com.android.os.statsd/javalib/service-statsd.jar";
+ private static final String CONNECTIVITY_SERVICE_APEX_PATH =
+ "/apex/com.android.tethering/javalib/service-connectivity.jar";
private static final String STATS_COMPANION_LIFECYCLE_CLASS =
"com.android.server.stats.StatsCompanion$Lifecycle";
private static final String STATS_PULL_ATOM_SERVICE_CLASS =
@@ -1217,7 +1219,8 @@ public final class SystemServer {
}
t.traceBegin("IpConnectivityMetrics");
- mSystemServiceManager.startService(IP_CONNECTIVITY_METRICS_CLASS);
+ mSystemServiceManager.startServiceFromJar(IP_CONNECTIVITY_METRICS_CLASS,
+ CONNECTIVITY_SERVICE_APEX_PATH);
t.traceEnd();
t.traceBegin("NetworkWatchlistService");
@@ -1558,8 +1561,8 @@ public final class SystemServer {
// This has to be called after NetworkManagementService, NetworkStatsService
// and NetworkPolicyManager because ConnectivityService needs to take these
// services to initialize.
- // TODO: Dynamically load service-connectivity.jar by using startServiceFromJar.
- mSystemServiceManager.startService(CONNECTIVITY_SERVICE_INITIALIZER_CLASS);
+ mSystemServiceManager.startServiceFromJar(CONNECTIVITY_SERVICE_INITIALIZER_CLASS,
+ CONNECTIVITY_SERVICE_APEX_PATH);
connectivity = IConnectivityManager.Stub.asInterface(
ServiceManager.getService(Context.CONNECTIVITY_SERVICE));
// TODO: Use ConnectivityManager instead of ConnectivityService.