diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 30537df111993..6dc7bc641a732 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -313,7 +313,8 @@
com.android.systemui.SystemUIFactory
-
+
- com.android.systemui.util.NotificationChannels
- com.android.systemui.keyguard.KeyguardViewMediator
@@ -340,6 +341,12 @@
- com.android.systemui.wmshell.WMShell
+
+
+
+
-1dp
-1dp
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 865ca40b1f4cd..4fd2701314665 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -42,6 +42,8 @@ import com.android.systemui.util.NotificationChannels;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
/**
* Application class for SystemUI.
@@ -159,8 +161,17 @@ public class SystemUIApplication extends Application implements
*/
public void startServicesIfNeeded() {
- String[] names = SystemUIFactory.getInstance().getSystemUIServiceComponents(getResources());
- startServicesIfNeeded(/* metricsPrefix= */ "StartServices", names);
+ final String[] names = SystemUIFactory.getInstance()
+ .getSystemUIServiceComponents(getResources());
+ final String[] additionalNames = SystemUIFactory.getInstance()
+ .getAdditionalSystemUIServiceComponents(getResources());
+
+ final ArrayList serviceComponents = new ArrayList<>();
+ Collections.addAll(serviceComponents, names);
+ Collections.addAll(serviceComponents, additionalNames);
+
+ startServicesIfNeeded(/* metricsPrefix= */ "StartServices",
+ serviceComponents.toArray(new String[serviceComponents.size()]));
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
index a28223de2bf12..d31301aacbcbd 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
@@ -186,6 +186,13 @@ public class SystemUIFactory {
return resources.getStringArray(R.array.config_systemUIServiceComponents);
}
+ /**
+ * Returns the list of additional system UI components that should be started.
+ */
+ public String[] getAdditionalSystemUIServiceComponents(Resources resources) {
+ return resources.getStringArray(R.array.config_additionalSystemUIServiceComponents);
+ }
+
/**
* Returns the list of system UI components that should be started per user.
*/