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

Commit a14bbf57 authored by Josh Yang's avatar Josh Yang Committed by Android (Google) Code Review
Browse files

Merge "SystemServer: add Telephony guards"

parents 06aea330 759a6d44
Loading
Loading
Loading
Loading
+23 −18
Original line number Diff line number Diff line
@@ -1454,9 +1454,14 @@ public final class SystemServer implements Dumpable {
            ServiceManager.addService("scheduling_policy", new SchedulingPolicyService());
            t.traceEnd();

            // 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)) {
                t.traceBegin("StartTelecomLoaderService");
                mSystemServiceManager.startService(TelecomLoaderService.class);
                t.traceEnd();
            }

            t.traceBegin("StartTelephonyRegistry");
            telephonyRegistry = new TelephonyRegistry(
@@ -2566,10 +2571,12 @@ public final class SystemServer implements Dumpable {
            mActivityManagerService.enterSafeMode();
        }

        if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
            // MMS service broker
            t.traceBegin("StartMmsService");
            mmsService = mSystemServiceManager.startService(MmsServiceBroker.class);
            t.traceEnd();
        }

        if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOFILL)) {
            t.traceBegin("StartAutoFillService");
@@ -2985,9 +2992,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);
            }
@@ -3001,15 +3006,15 @@ public final class SystemServer implements Dumpable {
                reportWtf("Notifying MediaRouterService running", e);
            }
            t.traceEnd();
            if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
                t.traceBegin("MakeMmsServiceReady");
                try {
                if (mmsServiceF != null) {
                    mmsServiceF.systemRunning();
                }
                    if (mmsServiceF != null) mmsServiceF.systemRunning();
                } catch (Throwable e) {
                    reportWtf("Notifying MmsService running", e);
                }
                t.traceEnd();
            }

            t.traceBegin("IncidentDaemonReady");
            try {