Closed
Bug 1003662
Opened 10 years ago
Closed 10 years ago
[Bluedroid] The number of BT profile controller increases incorrectly when user connect and disconnect Hand-free device rapidly by toggling BT switch. It would lead to abnormal connection behaviour.
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(blocking-b2g:1.4+)
People
(Reporter: jaliu, Assigned: jaliu)
References
Details
(Whiteboard: [p=1], [ETA:5/8])
Attachments
(1 file, 1 obsolete file)
2.00 KB,
patch
|
Details | Diff | Splinter Review |
STR: 1. Enable BT 2. Pair and connect to a HFP device 3. Disable BT in the middle of connection procedure. Repeat step 1-3 rapidly several times.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jaliu
Assignee | ||
Updated•10 years ago
|
Summary: The number of BT profile controller increases incorrectly when user connect and disconnect Hand-free device rapidly by toggling BT switch. It would lead to abnormal connection behaviour. → [Bluedroid] The number of BT profile controller increases incorrectly when user connect and disconnect Hand-free device rapidly by toggling BT switch. It would lead to abnormal connection behaviour.
Assignee | ||
Comment 1•10 years ago
|
||
We put profile connection requests in a queue (array) and expect to pop out every request after we finish the profile connection procedure. If we interrupt the connection by turn off BT, the queue would remain some useless element and cause to the failure of next profile connection. In addition, the element of queue become a kind of memory leak to system. Please refer to this line http://dxr.mozilla.org/mozilla-central/source/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp#1180
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8415034 -
Flags: review?(echou)
Attachment #8415034 -
Flags: feedback?(shuang)
Updated•10 years ago
|
blocking-b2g: --- → 1.4?
Updated•10 years ago
|
blocking-b2g: 1.4? → 1.4+
Comment on attachment 8415034 [details] [diff] [review] Clear BT profile controller array when BT is off. (v0) Review of attachment 8415034 [details] [diff] [review]: ----------------------------------------------------------------- Good catch! Thanks.
Attachment #8415034 -
Flags: feedback?(shuang) → feedback+
Comment 4•10 years ago
|
||
Comment on attachment 8415034 [details] [diff] [review] Clear BT profile controller array when BT is off. (v0) Review of attachment 8415034 [details] [diff] [review]: ----------------------------------------------------------------- Hi Jamin, The main idea looks good to me, r- because of the same reason of bug 1003658. Please see my comment below. Thanks. ::: dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp @@ +263,5 @@ > > + if (!sIsBtEnabled && sControllerArray.Length()) { > + for (unsigned int i = 0; i < sControllerArray.Length(); ++i) { > + sControllerArray[i]= nullptr ; > + } Assigning each element to nullptr seems not required to me. This is actually the reason why I gave r- to bug 1003658. Please check if this is necessary. @@ +1180,5 @@ > sControllerArray.AppendElement(controller); > > /** > + * If the request is the first element of the queue, start from here. Note > + * that other request is pushed into the queue and is popped out after the nit: 'other' should be followed by request's'
Attachment #8415034 -
Flags: review?(echou) → review-
Assignee | ||
Updated•10 years ago
|
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Whiteboard: [p=1]
Assignee | ||
Updated•10 years ago
|
Whiteboard: [p=1] → [p=1], [ETA:5/8]
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8415034 -
Attachment is obsolete: true
Attachment #8417789 -
Flags: review?(echou)
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Eric Chou [:ericchou] [:echou] from comment #4) > ::: dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp > @@ +263,5 @@ > > > > + if (!sIsBtEnabled && sControllerArray.Length()) { > > + for (unsigned int i = 0; i < sControllerArray.Length(); ++i) { > > + sControllerArray[i]= nullptr ; > > + } > Assigning each element to nullptr seems not required to me. This is actually the reason why I gave r- > to bug 1003658. Please check if this is necessary. The for loop here is unnecessary and I should remove it. The Clear() function would trigger the destructor of nsRefPtr. Thank you.
Updated•10 years ago
|
Target Milestone: --- → 2.0 S1 (9may)
Comment 7•10 years ago
|
||
Comment on attachment 8417789 [details] [diff] [review] Clear BT profile controller array when BT is off. (v1) Review of attachment 8417789 [details] [diff] [review]: ----------------------------------------------------------------- This patch is actually covered by the patch for bug 1003663.
Attachment #8417789 -
Flags: review?(echou)
Assignee | ||
Comment 8•10 years ago
|
||
The bug would be fixed by https://hg.mozilla.org/integration/b2g-inbound/rev/5bc7a1c7054c. I'll mark it as DUPLICATE RESOLVED when Bug 1003663 is closed.
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•