summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/res/res/values/cm_symbols.xml29
-rwxr-xr-xcore/res/res/values/config.xml3
-rw-r--r--services/java/com/android/server/SystemServer.java11
3 files changed, 43 insertions, 0 deletions
diff --git a/core/res/res/values/cm_symbols.xml b/core/res/res/values/cm_symbols.xml
new file mode 100644
index 0000000..6ed09b9
--- /dev/null
+++ b/core/res/res/values/cm_symbols.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2012-2015 The CyanogenMod Project
+ Copyright (c) 2013, The Linux Foundation. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- We don't want to publish private symbols in android.R as part of the
+ SDK. Instead, put them here. -->
+ <private-symbols package="com.android.internal" />
+
+ <!-- Private symbols that we need to reference from framework code. See
+ frameworks/base/core/res/MakeJavaSymbols.sed for how to easily generate
+ this.
+ -->
+ <!-- External CM specific core services -->
+ <java-symbol type="array" name="config_externalCMServices" />
+</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index e326adc..1e5db81 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2317,4 +2317,7 @@
<!-- Configuration that determines if PROTOCOL_ERRORS is to be treated as a
permanent error -->
<bool translatable="false" name="config_protocol_errors_perm_failure">true</bool>
+
+ <!-- External CM Services list -->
+ <string-array name="config_externalCMServices"></string-array>
</resources>
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 {