diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 9e60f339fc030..2477e7152b00d 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -840,7 +840,11 @@ public final class SystemServer { } else { Slog.i(TAG, "No Wi-Fi Aware Service (Aware 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");