Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93fcaca2 authored by Mike Lockwood's avatar Mike Lockwood Committed by Mike Lockwood
Browse files

SystemServer: Don't start A2DP service if audio is not enabled

parent 1eb72044
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -232,10 +232,13 @@ class ServerThread extends Thread {
                bluetooth = new BluetoothService(context);
                bluetooth = new BluetoothService(context);
                ServiceManager.addService(BluetoothAdapter.BLUETOOTH_SERVICE, bluetooth);
                ServiceManager.addService(BluetoothAdapter.BLUETOOTH_SERVICE, bluetooth);
                bluetooth.initAfterRegistration();
                bluetooth.initAfterRegistration();

                if (!"0".equals(SystemProperties.get("system_init.startaudioservice"))) {
                    bluetoothA2dp = new BluetoothA2dpService(context, bluetooth);
                    bluetoothA2dp = new BluetoothA2dpService(context, bluetooth);
                    ServiceManager.addService(BluetoothA2dpService.BLUETOOTH_A2DP_SERVICE,
                    ServiceManager.addService(BluetoothA2dpService.BLUETOOTH_A2DP_SERVICE,
                                              bluetoothA2dp);
                                              bluetoothA2dp);
                    bluetooth.initAfterA2dpRegistration();
                    bluetooth.initAfterA2dpRegistration();
                }


                int airplaneModeOn = Settings.System.getInt(mContentResolver,
                int airplaneModeOn = Settings.System.getInt(mContentResolver,
                        Settings.System.AIRPLANE_MODE_ON, 0);
                        Settings.System.AIRPLANE_MODE_ON, 0);