Merge "Disable WiFi p2p service if it's not supported."

This commit is contained in:
Wei Liu
2016-06-01 20:38:14 +00:00
committed by Android (Google) Code Review

View File

@@ -826,7 +826,11 @@ public final class SystemServer {
} else {
Slog.i(TAG, "No Wi-Fi NAN Service (NAN support Not Present)");
}
mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);
if (context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_WIFI_DIRECT)) {
mSystemServiceManager.startService(WIFI_P2P_SERVICE_CLASS);
}
mSystemServiceManager.startService(WIFI_SERVICE_CLASS);
mSystemServiceManager.startService(
"com.android.server.wifi.scanner.WifiScanningService");