SystemServer: Don't start A2DP service if audio is not enabled
Change-Id: I1f0ccf5ecb878a66a7c24d046ad1fb076a5f8e44 Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@@ -214,10 +214,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);
|
||||
|
||||
Reference in New Issue
Block a user