summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mike Lockwood <lockwood@android.com> 2011-09-18 18:19:59 -0400
committer Mike Lockwood <lockwood@google.com> 2012-02-10 10:51:21 -0800
commit93fcaca2aa329e60f8fecc69cb81e7b0fe47066b (patch)
treefd24eb920744448ce775e3e75bd79f22c42afb75
parent1eb720446dec3248ba102c4635bf113d450d0d73 (diff)
SystemServer: Don't start A2DP service if audio is not enabled
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r--services/java/com/android/server/SystemServer.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index d132949bc2f0..e0d8d4ed081e 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -232,10 +232,13 @@ class ServerThread extends Thread {
bluetooth = new BluetoothService(context);
ServiceManager.addService(BluetoothAdapter.BLUETOOTH_SERVICE, bluetooth);
bluetooth.initAfterRegistration();
- bluetoothA2dp = new BluetoothA2dpService(context, bluetooth);
- ServiceManager.addService(BluetoothA2dpService.BLUETOOTH_A2DP_SERVICE,
- bluetoothA2dp);
- bluetooth.initAfterA2dpRegistration();
+
+ if (!"0".equals(SystemProperties.get("system_init.startaudioservice"))) {
+ bluetoothA2dp = new BluetoothA2dpService(context, bluetooth);
+ ServiceManager.addService(BluetoothA2dpService.BLUETOOTH_A2DP_SERVICE,
+ bluetoothA2dp);
+ bluetooth.initAfterA2dpRegistration();
+ }
int airplaneModeOn = Settings.System.getInt(mContentResolver,
Settings.System.AIRPLANE_MODE_ON, 0);