Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1097,7 +1097,7 @@ public class AdapterService extends Service { * @return true if any profile is enabled, false otherwise */ @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) private boolean isAnyProfileEnabled(BluetoothDevice device) { boolean isAnyProfileEnabled(BluetoothDevice device) { if (mA2dpService != null && mA2dpService.getConnectionPolicy(device) > BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +6 −0 Original line number Diff line number Diff line Loading @@ -788,6 +788,12 @@ final class RemoteDevices { if (sAdapterService.getConnectionState(device) == 0) { resetBatteryLevel(device); } if (!sAdapterService.isAnyProfileEnabled(device)) { DeviceProperties deviceProp = getDeviceProperties(device); if (deviceProp != null) { deviceProp.setBondingInitiatedLocally(false); } } debugLog( "aclStateChangeCallback: Adapter State: " + BluetoothAdapter.nameForState(state) + " Disconnected: " + device Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1097,7 +1097,7 @@ public class AdapterService extends Service { * @return true if any profile is enabled, false otherwise */ @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) private boolean isAnyProfileEnabled(BluetoothDevice device) { boolean isAnyProfileEnabled(BluetoothDevice device) { if (mA2dpService != null && mA2dpService.getConnectionPolicy(device) > BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +6 −0 Original line number Diff line number Diff line Loading @@ -788,6 +788,12 @@ final class RemoteDevices { if (sAdapterService.getConnectionState(device) == 0) { resetBatteryLevel(device); } if (!sAdapterService.isAnyProfileEnabled(device)) { DeviceProperties deviceProp = getDeviceProperties(device); if (deviceProp != null) { deviceProp.setBondingInitiatedLocally(false); } } debugLog( "aclStateChangeCallback: Adapter State: " + BluetoothAdapter.nameForState(state) + " Disconnected: " + device Loading