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

Commit 91f757b5 authored by bohu's avatar bohu
Browse files

Check wifi feature before starting wifi service

Otherwise, Wifi service could crash SystemServer;
for example, on emulator system image where wifi
feature is missing, starting wifi will cause boot
failure.

BUG: 70378659

Change-Id: I82546c2c63fb6736e8216a7942fba2d3c9affb13
parent 02775c78
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -1088,6 +1088,8 @@ public final class SystemServer {
            }
            traceEnd();

            if (context.getPackageManager().hasSystemFeature(
                        PackageManager.FEATURE_WIFI)) {
                // Wifi Service must be started first for wifi-related services.
                traceBeginAndSlog("StartWifi");
                mSystemServiceManager.startService(WIFI_SERVICE_CLASS);
@@ -1096,6 +1098,7 @@ public final class SystemServer {
                mSystemServiceManager.startService(
                    "com.android.server.wifi.scanner.WifiScanningService");
                traceEnd();
            }

            if (!disableRtt) {
                traceBeginAndSlog("StartWifiRtt");