Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +15 −0 Original line number Diff line number Diff line Loading @@ -5524,6 +5524,13 @@ public class AdapterService extends Service { BluetoothProfile.CONNECTION_POLICY_ALLOWED); numProfilesConnected++; } if (mBatteryService != null && isProfileSupported( device, BluetoothProfile.BATTERY)) { Log.i(TAG, "connectAllEnabledProfiles: Connecting Battery Service"); mBatteryService.setConnectionPolicy(device, BluetoothProfile.CONNECTION_POLICY_ALLOWED); numProfilesConnected++; } Log.i(TAG, "connectAllEnabledProfiles: Number of Profiles Connected: " + numProfilesConnected); Loading Loading @@ -5673,6 +5680,14 @@ public class AdapterService extends Service { + "LE Broadcast Assistant Profile"); mBassClientService.disconnect(device); } if (mBatteryService != null && (mBatteryService.getConnectionState(device) == BluetoothProfile.STATE_CONNECTED || mBatteryService.getConnectionState(device) == BluetoothProfile.STATE_CONNECTING)) { Log.i(TAG, "disconnectAllEnabledProfiles: Disconnecting " + "Battery Service"); mBatteryService.disconnect(device); } return BluetoothStatusCodes.SUCCESS; } Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +15 −0 Original line number Diff line number Diff line Loading @@ -5524,6 +5524,13 @@ public class AdapterService extends Service { BluetoothProfile.CONNECTION_POLICY_ALLOWED); numProfilesConnected++; } if (mBatteryService != null && isProfileSupported( device, BluetoothProfile.BATTERY)) { Log.i(TAG, "connectAllEnabledProfiles: Connecting Battery Service"); mBatteryService.setConnectionPolicy(device, BluetoothProfile.CONNECTION_POLICY_ALLOWED); numProfilesConnected++; } Log.i(TAG, "connectAllEnabledProfiles: Number of Profiles Connected: " + numProfilesConnected); Loading Loading @@ -5673,6 +5680,14 @@ public class AdapterService extends Service { + "LE Broadcast Assistant Profile"); mBassClientService.disconnect(device); } if (mBatteryService != null && (mBatteryService.getConnectionState(device) == BluetoothProfile.STATE_CONNECTED || mBatteryService.getConnectionState(device) == BluetoothProfile.STATE_CONNECTING)) { Log.i(TAG, "disconnectAllEnabledProfiles: Disconnecting " + "Battery Service"); mBatteryService.disconnect(device); } return BluetoothStatusCodes.SUCCESS; } Loading