summaryrefslogtreecommitdiff
path: root/services/java
diff options
context:
space:
mode:
authorTej Singh <singhtejinder@google.com>2020-01-08 15:03:38 -0800
committerTej Singh <singhtejinder@google.com>2020-01-10 11:27:21 -0800
commitb2d6884ecfb20706b6987b9edc9871fa5eb26309 (patch)
treeb47ea4c362511aa2bcca1ff7cde185488b9d312f /services/java
parent55447e3702173a009a50735e2937953b65157a92 (diff)
Dynamically load statsd-service
Previously, service-statsd.jar was on the SYSTEM_SERVER_CLASSPATH. This CL loads StatsCompanion from SystemServer.java dynamically so that the jar does not have to be on the classpath. Bug: 146064616 Test: boots Change-Id: Ia0e98ed0b6e35da01b38ead2fcf45d440eae31c3
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/SystemServer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index cfe131899987..7aee66e3cd7e 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -212,6 +212,8 @@ public final class SystemServer {
"com.android.server.print.PrintManagerService";
private static final String COMPANION_DEVICE_MANAGER_SERVICE_CLASS =
"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 STATS_COMPANION_LIFECYCLE_CLASS =
"com.android.server.stats.StatsCompanion$Lifecycle";
private static final String USB_SERVICE_CLASS =
@@ -1972,7 +1974,8 @@ public final class SystemServer {
// Statsd helper
t.traceBegin("StartStatsCompanion");
- mSystemServiceManager.startService(STATS_COMPANION_LIFECYCLE_CLASS);
+ mSystemServiceManager.startServiceFromJar(
+ STATS_COMPANION_LIFECYCLE_CLASS, STATS_COMPANION_APEX_PATH);
t.traceEnd();
// Incidentd and dumpstated helper