summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nick Felker <fleker@google.com> 2017-10-12 13:27:02 -0700
committer Nick Felker <fleker@google.com> 2017-10-14 00:07:33 +0000
commit1bfe59d17955bf75b44600b18927d07552e2378c (patch)
treec9905e6ef6cae925dce66b6d28ca2fdfb6c959dd
parent1a1cee7268a675438c69f0e02433560517d18f4f (diff)
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
-rw-r--r--services/java/com/android/server/SystemServer.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 49dd5285691b..df4cec5f1160 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -206,7 +206,8 @@ public final class SystemServer {
"com.android.server.autofill.AutofillManagerService";
private static final String TIME_ZONE_RULES_MANAGER_SERVICE_CLASS =
"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 UNCRYPT_PACKAGE_FILE = "/cache/recovery/uncrypt_file";
@@ -1544,6 +1545,12 @@ public final class SystemServer {
traceEnd();
}
+ if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_EMBEDDED)) {
+ traceBeginAndSlog("StartIoTSystemService");
+ mSystemServiceManager.startService(IOT_SERVICE_CLASS);
+ traceEnd();
+ }
+
// Statsd helper
traceBeginAndSlog("StartStatsCompanionService");
mSystemServiceManager.startService(StatsCompanionService.Lifecycle.class);