Merge "Revert "Revert "Revert "Revert "Introduce initOrder for apex-system-services."""""
This commit is contained in:
committed by
Android (Google) Code Review
commit
02e0ed6436
@@ -154,6 +154,7 @@ 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;
|
||||
@@ -224,8 +225,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;
|
||||
@@ -1471,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();
|
||||
@@ -1479,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();
|
||||
|
||||
@@ -2997,7 +2998,9 @@ 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);
|
||||
}
|
||||
@@ -3062,10 +3065,12 @@ public final class SystemServer implements Dumpable {
|
||||
*/
|
||||
private void startApexServices(@NonNull TimingsTraceAndSlog t) {
|
||||
t.traceBegin("startApexServices");
|
||||
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);
|
||||
// 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();
|
||||
t.traceBegin("starting " + name);
|
||||
if (TextUtils.isEmpty(jarPath)) {
|
||||
mSystemServiceManager.startService(name);
|
||||
|
||||
Reference in New Issue
Block a user