diff options
| author | 2022-02-03 00:15:04 +0000 | |
|---|---|---|
| committer | 2022-02-03 00:15:04 +0000 | |
| commit | aea37f3fb3bc2745f422cc2ac4a8802365b79041 (patch) | |
| tree | 3ea1439ca3b38a9190600369985487e427ac8586 /services/java/com | |
| parent | defa3794172c5b138f69f50eca0d75da017badff (diff) | |
| parent | 00029af7e01f7911648b819af154369b04f1c3c2 (diff) | |
Merge "Revert "Revert "Revert "Introduce initOrder for apex-system-services.""""
Diffstat (limited to 'services/java/com')
| -rw-r--r-- | services/java/com/android/server/SystemServer.java | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index f4fae2f81718..d0c861fa912e 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -154,7 +154,6 @@ import com.android.server.os.NativeTombstoneManagerService; import com.android.server.os.SchedulingPolicyService; import com.android.server.people.PeopleService; import com.android.server.pm.ApexManager; -import com.android.server.pm.ApexSystemServiceInfo; import com.android.server.pm.CrossProfileAppsService; import com.android.server.pm.DataLoaderManagerService; import com.android.server.pm.DynamicCodeLoggingService; @@ -225,8 +224,8 @@ import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Date; import java.util.LinkedList; -import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Timer; import java.util.TreeSet; import java.util.concurrent.CountDownLatch; @@ -1473,7 +1472,7 @@ public final class SystemServer implements Dumpable { // TelecomLoader hooks into classes with defined HFP logic, // so check for either telephony or microphone. if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_MICROPHONE) || - mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { + mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) { t.traceBegin("StartTelecomLoaderService"); mSystemServiceManager.startService(TelecomLoaderService.class); t.traceEnd(); @@ -1481,7 +1480,7 @@ public final class SystemServer implements Dumpable { t.traceBegin("StartTelephonyRegistry"); telephonyRegistry = new TelephonyRegistry( - context, new TelephonyRegistry.ConfigurationProvider()); + context, new TelephonyRegistry.ConfigurationProvider()); ServiceManager.addService("telephony.registry", telephonyRegistry); t.traceEnd(); @@ -3018,9 +3017,7 @@ public final class SystemServer implements Dumpable { t.traceEnd(); t.traceBegin("MakeTelephonyRegistryReady"); try { - if (telephonyRegistryF != null) { - telephonyRegistryF.systemRunning(); - } + if (telephonyRegistryF != null) telephonyRegistryF.systemRunning(); } catch (Throwable e) { reportWtf("Notifying TelephonyRegistry running", e); } @@ -3085,12 +3082,10 @@ public final class SystemServer implements Dumpable { */ private void startApexServices(@NonNull TimingsTraceAndSlog t) { t.traceBegin("startApexServices"); - // TODO(b/192880996): get the list from "android" package, once the manifest entries - // are migrated to system manifest. - List<ApexSystemServiceInfo> services = ApexManager.getInstance().getApexSystemServices(); - for (ApexSystemServiceInfo info : services) { - String name = info.getName(); - String jarPath = info.getJarPath(); + Map<String, String> services = ApexManager.getInstance().getApexSystemServices(); + // TODO(satayev): introduce android:order for services coming the same apexes + for (String name : new TreeSet<>(services.keySet())) { + String jarPath = services.get(name); t.traceBegin("starting " + name); if (TextUtils.isEmpty(jarPath)) { mSystemServiceManager.startService(name); |