Closed
Bug 935882
Opened 12 years ago
Closed 12 years ago
[bluedroid] Support GetConnectedDevice API
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.3 Sprint 5 - 11/22
People
(Reporter: shawnjohnjr, Assigned: shawnjohnjr)
Details
Attachments
(1 file, 3 obsolete files)
Support GetConnectedDevice API
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8334559 -
Flags: review?(echou)
Comment 2•12 years ago
|
||
Comment on attachment 8334559 [details] [diff] [review]
Bug 935882 - [bluedroid] Support GetConnectedDevice API
Review of attachment 8334559 [details] [diff] [review]:
-----------------------------------------------------------------
The main reason I r- is that I would like to propose using only one array to keep DOM requests which were sent via GetPairedDevices() and GetConnectedDevices().
::: dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.cpp
@@ +386,5 @@
> BT_LOGR("No runnable to return");
> return;
> }
>
> + if (!sGetPairedDeviceRunnableArray.IsEmpty()) {
I don't think this mechanism would work. It's definitely possible that sGetPairedDeviceRunnableArray and sGetConnectedDeviceRunnableArray may both have elements. In that case we will fire the DOM request of GetPairedDevice() before GetConnectedDevice() anyway and it's clearly not right.
We should only use one of these two runnable array since we have already assumed that bluedroid will handle each request in sequence.
@@ +792,5 @@
> + DispatchBluetoothReply(aRunnable, BluetoothValue(emptyArr), EmptyString());
> + return NS_OK;
> + }
> +
> + nsRefPtr<BluetoothReplyRunnable> runnable = aRunnable;
Unused variable.
Attachment #8334559 -
Flags: review?(echou) → review-
Assignee | ||
Updated•12 years ago
|
Attachment #8334559 -
Attachment is obsolete: true
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #8335827 -
Flags: review?(echou)
Assignee | ||
Updated•12 years ago
|
Attachment #8335827 -
Attachment is obsolete: true
Attachment #8335827 -
Flags: review?(echou)
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #8335880 -
Flags: review?(echou)
Comment 5•12 years ago
|
||
Comment on attachment 8335880 [details] [diff] [review]
Bug 935882 - [bluedroid] Support GetConnectedDevice API
Review of attachment 8335880 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nits addressed.
::: dom/bluetooth/bluedroid/gonk/BluetoothServiceBluedroid.cpp
@@ +812,5 @@
> {
> MOZ_ASSERT(NS_IsMainThread());
>
> + nsAutoString errorStr;
> + BluetoothValue values = InfallibleTArray<BluetoothNamedValue>();
Variable 'values' is only used at line 827, so please move this into that if-block.
@@ +841,5 @@
> + DispatchBluetoothReply(aRunnable, BluetoothValue(emptyArr), EmptyString());
> + return NS_OK;
> + }
> +
> + nsRefPtr<BluetoothReplyRunnable> runnable = aRunnable;
Please remove unused variable 'runnable'.
Attachment #8335880 -
Flags: review?(echou) → review+
Updated•12 years ago
|
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Assignee | ||
Updated•12 years ago
|
Attachment #8335880 -
Attachment is obsolete: true
Assignee | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 5 - 11/22
You need to log in
before you can comment on or make changes to this bug.
Description
•