Disable WiFi p2p service if it's not supported.

b/26877020

Change-Id: I84b822fa57423711de75d2147effe73a1fc40eb4
This commit is contained in:
Wei Liu
2016-05-23 15:12:49 -07:00
parent d6de352fdd
commit 4e62ac5eef

View File

@@ -823,7 +823,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");