Closed Bug 932682 Opened 11 years ago Closed 11 years ago

[bluedroid] Support Pair/Unpair, Bond state changed callback

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: shawnjohnjr, Assigned: shawnjohnjr)

References

Details

Attachments

(1 file, 2 obsolete files)

Enable pin code/secure simple pairing, and BondChangedState callback
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Comment on attachment 826638 [details] [diff] [review]
Bug 932682 - [bluedroid] Support Pair/Unpair, Bond state changed callback

Review of attachment 826638 [details] [diff] [review]:
-----------------------------------------------------------------

Hi Shawn, please see my comments below.

::: dom/bluetooth/BluetoothServiceBluedroid.cpp
@@ +877,5 @@
> +
> +  int ret = sBtInterface->remove_bond(&remoteAddress);
> +  if (ret != BT_STATUS_SUCCESS) {
> +    ReplyStatusError(aRunnable, ret,
> +                     NS_LITERAL_STRING("RemoveDevice"));

Need to return NS_OK here. Please refer to function CreatePairedDeviceInternal().

@@ +908,5 @@
> +  if (ret != BT_STATUS_SUCCESS) {
> +    ReplyStatusError(aRunnable, ret,
> +                     NS_LITERAL_STRING("SetPinCode"));
> +
> +    return false;

For consistency with other similar functions, 'true' should be returned in this case.

@@ +940,5 @@
> +  StringToBdAddressType(aDeviceAddress, &remoteAddress);
> +
> +  int ret = sBtInterface->ssp_reply(&remoteAddress,
> +      (bt_ssp_variant_t)0,
> +      aConfirm, 0);

nit: weird indentation.

@@ +944,5 @@
> +      aConfirm, 0);
> +  if (ret != BT_STATUS_SUCCESS) {
> +    ReplyStatusError(aRunnable, ret,
> +                     NS_LITERAL_STRING("SetPairingConfirmation"));
> +    return false;

For consistency with other similar functions, 'true' should be returned in this case.
Attachment #826638 - Attachment is obsolete: true
Attachment #826638 - Flags: review?(echou)
Attachment #827312 - Attachment is obsolete: true
Attachment #827312 - Flags: review?(echou)
Attachment #827334 - Attachment description: Bug 932682 - [bluedroid] Support Pair/Unpair, Bond state changed callbackBug932682 → Bug 932682 - [bluedroid] Support Pair/Unpair, Bond state changed callback
Comment on attachment 827334 [details] [diff] [review]
Bug 932682 - [bluedroid] Support Pair/Unpair, Bond state changed callback

Review of attachment 827334 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thanks!
Attachment #827334 - Flags: review?(echou) → review+
https://hg.mozilla.org/mozilla-central/rev/fd2e2d6edbd4
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: