From d98a4e502165d76d05e095608da3c795bd56eafd Mon Sep 17 00:00:00 2001 From: Pulkit Bhuwalka Date: Tue, 14 Feb 2017 16:27:10 -0800 Subject: Remove outdated emulator check which causes BT to not start ro.kernel.qemu based check to determine whether Bluetooth should be started or not was an old hack used when "features" was not available to determine hardware availability. This was later fixed with the hasSystemFeature check. However, the old check was not removed. The presence of the old check causes Bluetooth to not start on Android Things devices which have ro.kernel.qemu set for graphics usage. It's also preferable to depend on the system API rather than on build configs. Related CLs modify the emulator builds to correct the config in builds. Bug: 35361545 Change-Id: I219ce5e14709c76dcba43af4693093e985269d43 Test: Verified by launching bluetooth on local devices after removing the old check. Also verified by booting up the emulator and verifying that Bluetooth Services do not start. --- services/java/com/android/server/SystemServer.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index de4a55bc8d6a..ed5bb07ca104 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -557,8 +557,6 @@ public final class SystemServer { boolean disableCameraService = SystemProperties.getBoolean("config.disable_cameraservice", false); - boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1"); - try { Slog.i(TAG, "Reading configuration..."); SystemConfig.getInstance(); @@ -645,12 +643,7 @@ public final class SystemServer { // TODO: Use service dependencies instead. mDisplayManagerService.windowManagerAndInputReady(); - // Skip Bluetooth if we have an emulator kernel - // TODO: Use a more reliable check to see if this product should - // support Bluetooth - see bug 988521 - if (isEmulator) { - Slog.i(TAG, "No Bluetooth Service (emulator)"); - } else if (mFactoryTestMode == FactoryTest.FACTORY_TEST_LOW_LEVEL) { + if (mFactoryTestMode == FactoryTest.FACTORY_TEST_LOW_LEVEL) { Slog.i(TAG, "No Bluetooth Service (factory test)"); } else if (!context.getPackageManager().hasSystemFeature (PackageManager.FEATURE_BLUETOOTH)) { -- cgit v1.2.3-59-g8ed1b