From 0e4ac33b1eab6be4b7cdc3492a9777aaefb3affd Mon Sep 17 00:00:00 2001 From: Adnan Begovic Date: Sun, 26 Apr 2015 02:29:03 -0700 Subject: SystemServer: Allow starting of overlaid external services. This allows external services overlaid in vendor/ whose implementation is in a different framework jar to be explicitly started via reflection similar to WIFI_SERVICE Change-Id: I119eda4ab0f447b5bee88e7634a20bdd569ef017 --- services/java/com/android/server/SystemServer.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'services/java') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index bd72860..dd3b3a7 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -438,6 +438,8 @@ public final class SystemServer { boolean disableNetwork = SystemProperties.getBoolean("config.disable_network", false); boolean disableNetworkTime = SystemProperties.getBoolean("config.disable_networktime", false); boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1"); + String[] externalServices = context.getResources() + .getStringArray(com.android.internal.R.array.config_externalCMServices); try { Slog.i(TAG, "Reading configuration..."); @@ -1002,6 +1004,15 @@ public final class SystemServer { // MMS service broker mmsService = mSystemServiceManager.startService(MmsServiceBroker.class); + for (String service : externalServices) { + try { + Slog.i(TAG, service); + mSystemServiceManager.startService(service); + } catch (Throwable e) { + Slog.e(TAG, "Failure starting " + service , e); + } + } + // It is now time to start up the app processes... try { -- cgit v1.1