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

Commit 7062ece9 authored by Adnan Begovic's avatar Adnan Begovic
Browse files

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
parent 0340bfc1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -337,4 +337,6 @@

    <!-- Quick Settings tile defaults -->
    <java-symbol type="string" name="config_defaultQuickSettingsTiles" />
 
    <java-symbol type="array" name="config_externalCMServices" />
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -2326,4 +2326,6 @@

    <!-- Default, comma-delimited, quick settings tiles. See QSConstants.java for a list of all available tiles -->
    <string name="config_defaultQuickSettingsTiles">wifi,bt,cell,airplane,rotation,flashlight,location,cast</string>

    <string-array name="config_externalCMServices"></string-array>
</resources>
+11 −0
Original line number Diff line number Diff line
@@ -454,6 +454,8 @@ public final class SystemServer {
        boolean digitalPenCapable =
            Resources.getSystem().getBoolean(com.android.internal.R.bool.config_digitalPenCapable);
        boolean disableAtlas = SystemProperties.getBoolean("config.disable_atlas", false);
        String[] externalServices = Resources.getSystem()
                .getStringArray(com.android.internal.R.array.config_externalCMServices);

        try {
            Slog.i(TAG, "Reading configuration...");
@@ -1198,6 +1200,15 @@ public final class SystemServer {
            }
        }

        for (String service : externalServices) {
            try {
                Slog.i(TAG, service);
                mSystemServiceManager.startService(service);
            } catch (Throwable e) {
                Slog.e(TAG, "Failure starting " + service , e);
            }
        }

        if (gestureService != null) {
            try {
                gestureService.systemReady();