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

Commit c62ceb2a authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Merge "Clear bonding initiated when all profile disabled" am: 68ae51d5 am:...

Merge "Clear bonding initiated when all profile disabled" am: 68ae51d5 am: a5f53a99 am: 80dc2e94

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1984748

Change-Id: Ife1757bbdcc246a4c7e29e540538de6c0774d7b7
parents e507d379 80dc2e94
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1090,7 +1090,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) {
+6 −0
Original line number Diff line number Diff line
@@ -847,6 +847,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