From aa9821bf323941a98828329b31d5dd164be6cb56 Mon Sep 17 00:00:00 2001 From: Rebecca Silberstein Date: Sat, 7 Jan 2017 01:59:16 -0800 Subject: SystemServer: reorder wifi services start Start WifiService before other wifi-related services. This is now possible since service dependencies were removed from the WifiStateMachine constructor. Bug: 34137732 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Test: frameworks/base/wifi/tests/runtests.sh Test: manually tested wifi connection Test: manually checked for Wifi Direct peers Merged-In: Iad4eb7053e60542d0be72208db53cf0f83004ae2 Change-Id: I1e57bfac83708644df6f016808c5972d2d6136c6 --- services/java/com/android/server/SystemServer.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 2477e7152b00..27d95a4603a6 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -834,6 +834,15 @@ public final class SystemServer { } Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER); + // Wifi Service must be started first for wifi-related services. + mSystemServiceManager.startService(WIFI_SERVICE_CLASS); + mSystemServiceManager.startService( + "com.android.server.wifi.scanner.WifiScanningService"); + + if (!disableRtt) { + mSystemServiceManager.startService("com.android.server.wifi.RttService"); + } + if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_WIFI_AWARE)) { mSystemServiceManager.startService(WIFI_AWARE_SERVICE_CLASS); @@ -845,13 +854,6 @@ public final class SystemServer { PackageManager.FEATURE_WIFI_DIRECT)) { mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS); } - mSystemServiceManager.startService(WIFI_SERVICE_CLASS); - mSystemServiceManager.startService( - "com.android.server.wifi.scanner.WifiScanningService"); - - if (!disableRtt) { - mSystemServiceManager.startService("com.android.server.wifi.RttService"); - } if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET) || mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST)) { -- cgit v1.2.3-59-g8ed1b