Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +12 −9 Original line number Diff line number Diff line Loading @@ -2369,21 +2369,24 @@ public class AdapterService extends Service { return false; } if (setA2dp && mA2dpService != null && mA2dpService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { Log.i(TAG, "setActiveDevice: Setting active A2dp device " + device.getAddress()); if (setA2dp && mA2dpService != null && (device == null || mA2dpService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED)) { Log.i(TAG, "setActiveDevice: Setting active A2dp device " + device); mA2dpService.setActiveDevice(device); } if (mHearingAidService != null && mHearingAidService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { Log.i(TAG, "setActiveDevice: Setting active Hearing Aid " + device.getAddress()); if (mHearingAidService != null && (device == null || mHearingAidService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED)) { Log.i(TAG, "setActiveDevice: Setting active Hearing Aid " + device); mHearingAidService.setActiveDevice(device); } if (setHeadset && mHeadsetService != null && mHeadsetService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { Log.i(TAG, "setActiveDevice: Setting active Headset " + device.getAddress()); if (setHeadset && mHeadsetService != null && (device == null || mHeadsetService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED)) { Log.i(TAG, "setActiveDevice: Setting active Headset " + device); mHeadsetService.setActiveDevice(device); } Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +12 −9 Original line number Diff line number Diff line Loading @@ -2369,21 +2369,24 @@ public class AdapterService extends Service { return false; } if (setA2dp && mA2dpService != null && mA2dpService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { Log.i(TAG, "setActiveDevice: Setting active A2dp device " + device.getAddress()); if (setA2dp && mA2dpService != null && (device == null || mA2dpService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED)) { Log.i(TAG, "setActiveDevice: Setting active A2dp device " + device); mA2dpService.setActiveDevice(device); } if (mHearingAidService != null && mHearingAidService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { Log.i(TAG, "setActiveDevice: Setting active Hearing Aid " + device.getAddress()); if (mHearingAidService != null && (device == null || mHearingAidService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED)) { Log.i(TAG, "setActiveDevice: Setting active Hearing Aid " + device); mHearingAidService.setActiveDevice(device); } if (setHeadset && mHeadsetService != null && mHeadsetService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED) { Log.i(TAG, "setActiveDevice: Setting active Headset " + device.getAddress()); if (setHeadset && mHeadsetService != null && (device == null || mHeadsetService.getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_ALLOWED)) { Log.i(TAG, "setActiveDevice: Setting active Headset " + device); mHeadsetService.setActiveDevice(device); } Loading