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

Commit 1bfe59d1 authored by Nick Felker's avatar Nick Felker
Browse files

Start IoT System Service from SystemServer

For feature type "embedded", launch IoTSystemService from
System Server.

Test: Wrote a IotSystemService and ensured that the service is
successfully started on an iot device.

Bug: 67641069
Change-Id: I5aa0408f35fb4a5b0787cf9b20454720d8ae130f
Cherry-picked and refactored from oc-iot-dev branch
parent 1a1cee72
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -206,7 +206,8 @@ public final class SystemServer {
            "com.android.server.autofill.AutofillManagerService";
            "com.android.server.autofill.AutofillManagerService";
    private static final String TIME_ZONE_RULES_MANAGER_SERVICE_CLASS =
    private static final String TIME_ZONE_RULES_MANAGER_SERVICE_CLASS =
            "com.android.server.timezone.RulesManagerService$Lifecycle";
            "com.android.server.timezone.RulesManagerService$Lifecycle";

    private static final String IOT_SERVICE_CLASS =
            "com.google.android.things.services.IoTSystemService";
    private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";
    private static final String PERSISTENT_DATA_BLOCK_PROP = "ro.frp.pst";


    private static final String UNCRYPT_PACKAGE_FILE = "/cache/recovery/uncrypt_file";
    private static final String UNCRYPT_PACKAGE_FILE = "/cache/recovery/uncrypt_file";
@@ -1544,6 +1545,12 @@ public final class SystemServer {
            traceEnd();
            traceEnd();
        }
        }


        if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_EMBEDDED)) {
            traceBeginAndSlog("StartIoTSystemService");
            mSystemServiceManager.startService(IOT_SERVICE_CLASS);
            traceEnd();
        }

        // Statsd helper
        // Statsd helper
        traceBeginAndSlog("StartStatsCompanionService");
        traceBeginAndSlog("StartStatsCompanionService");
        mSystemServiceManager.startService(StatsCompanionService.Lifecycle.class);
        mSystemServiceManager.startService(StatsCompanionService.Lifecycle.class);