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

Commit b392c53f authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change Iba6fd660 into eclair

* changes:
  Set BondState to Bonding only if it not Bonded already.
parents 98a9c56a 37686069
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -403,8 +403,12 @@ class BluetoothEventLoop {
            mBluetoothService.cancelPairingUserInput(address);
            return null;
        }
        // Set state to BONDING, for incoming connections it will be set here.
        // For outgoing connections, it gets set when call createBond.
        // Set state to BONDING. For incoming connections it will be set here.
        // For outgoing connections, it gets set when we call createBond.
        // Also set it only when the state is not already Bonded, we can sometimes
        // get an authorization request from the remote end if it doesn't have the link key
        // while we still have it.
        if (mBluetoothService.getBondState().getBondState(address) != BluetoothDevice.BOND_BONDED)
            mBluetoothService.getBondState().setBondState(address, BluetoothDevice.BOND_BONDING);
        return address;
    }