Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8437361 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Start NearbyService when system server starts."

parents 566aab72 0fc06be8
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -261,6 +261,8 @@ public final class SystemServer implements Dumpable {
            "/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 NEARBY_SERVICE_APEX_PATH =
            "/apex/com.android.nearby/javalib/service-nearby.jar";
    private static final String STATS_COMPANION_LIFECYCLE_CLASS =
            "com.android.server.stats.StatsCompanion$Lifecycle";
    private static final String STATS_PULL_ATOM_SERVICE_CLASS =
@@ -271,6 +273,8 @@ public final class SystemServer implements Dumpable {
            "com.android.server.usb.UsbService$Lifecycle";
    private static final String MIDI_SERVICE_CLASS =
            "com.android.server.midi.MidiService$Lifecycle";
    private static final String NEARBY_SERVICE_CLASS =
            "com.android.server.nearby.NearbyService";
    private static final String WIFI_APEX_SERVICE_JAR_PATH =
            "/apex/com.android.wifi/javalib/service-wifi.jar";
    private static final String WIFI_SERVICE_CLASS =
@@ -1974,6 +1978,16 @@ public final class SystemServer implements Dumpable {
            }
            t.traceEnd();

            // Start Nearby Service.
            t.traceBegin("StartNearbyService");
            try {
                mSystemServiceManager.startServiceFromJar(NEARBY_SERVICE_CLASS,
                        NEARBY_SERVICE_APEX_PATH);
            } catch (Throwable e) {
                reportWtf("starting NearbyService", e);
            }
            t.traceEnd();

            t.traceBegin("StartConnectivityService");
            // This has to be called after NetworkManagementService, NetworkStatsService
            // and NetworkPolicyManager because ConnectivityService needs to take these