Closed Bug 935882 Opened 12 years ago Closed 12 years ago

[bluedroid] Support GetConnectedDevice API

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

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
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-
Attachment #8335827 - Attachment is obsolete: true
Attachment #8335827 - Flags: review?(echou)
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+
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
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.

Attachment

General

Created:
Updated:
Size: