OSDN Git Service

DO NOT MERGE ANYWHERE Put the start of RttService behind a flag.
authorWei Liu <luciferleo@google.com>
Thu, 4 Feb 2016 00:57:31 +0000 (16:57 -0800)
committerWei Liu <luciferleo@google.com>
Thu, 4 Feb 2016 18:24:34 +0000 (18:24 +0000)
We can set config.disable_rtt in the init script to disable the
RttService.

b/26877020

Change-Id: Ifb7fedc4764329dc09cae41f06bf6d5fc7426e5f
(cherry picked from commit c47749f9908b5d98397379fb3bf80d330f9c8283)

services/java/com/android/server/SystemServer.java

index b64db57..93d12e9 100644 (file)
@@ -496,6 +496,7 @@ public final class SystemServer {
         boolean disableNonCoreServices = SystemProperties.getBoolean("config.disable_noncore", false);
         boolean disableNetwork = SystemProperties.getBoolean("config.disable_network", false);
         boolean disableNetworkTime = SystemProperties.getBoolean("config.disable_networktime", false);
+        boolean disableRtt = SystemProperties.getBoolean("config.disable_rtt", false);
         boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1");
 
         try {
@@ -788,7 +789,9 @@ public final class SystemServer {
                 mSystemServiceManager.startService(
                             "com.android.server.wifi.WifiScanningService");
 
-                mSystemServiceManager.startService("com.android.server.wifi.RttService");
+                if (!disableRtt) {
+                    mSystemServiceManager.startService("com.android.server.wifi.RttService");
+                }
 
                 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET) ||
                     mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST)) {