[b2g-bluetooth] Remove HfpCommandThread from BluetoothHfpManager

RESOLVED FIXED in Firefox 18

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: qdot, Assigned: qdot)

Tracking

Trunk
mozilla19
x86_64
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)

Details

Attachments

(1 attachment)

BluetoothHfpManager maintains its own thread to make what used to be a blocking call that's now non-blocking. We should be able to just schedule future events for this.

Filing blocking? because this involves removal of an extra thread, and a static nsCOMPtr that shouldn't be there.
Simple fix and blocking+ to avoid having to get aurora approval.
blocking-basecamp: ? → +
Created attachment 674909 [details] [diff] [review]
Patch 1 (v1) - Remove HfpCommandThread from HfpManager

Testing this myself, but if someone else could test this patch too, that'd be great.
Attachment #674909 - Flags: review?(echou)
Comment on attachment 674909 [details] [diff] [review]
Patch 1 (v1) - Remove HfpCommandThread from HfpManager

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

Looks great! Thanks for revising this part of code. Gina has tried this patch and everything looked good. :)

::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +180,2 @@
>  
> +    if(sStopSendingRingFlag) {

Nit: needs an additional space after 'if'

@@ +183,3 @@
>      }
>  
> +    if(!gBluetoothHfpManager) {

Nit: needs an additional space after 'if'

@@ +184,5 @@
>  
> +    if(!gBluetoothHfpManager) {
> +      NS_WARNING("BluetoothHfpManager no longer exists, cannot send ring!");
> +      return;
> +    } 

Nit: trailing space

@@ +185,5 @@
> +    if(!gBluetoothHfpManager) {
> +      NS_WARNING("BluetoothHfpManager no longer exists, cannot send ring!");
> +      return;
> +    } 
> +    gBluetoothHfpManager->SendLine("RING");    

Nit: trailing space
Attachment #674909 - Flags: review?(echou) → review+
https://hg.mozilla.org/mozilla-central/rev/e58288ffbfa0
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
https://hg.mozilla.org/releases/mozilla-aurora/rev/b73c1929073f
status-firefox18: --- → fixed
status-firefox19: --- → fixed
You need to log in before you can comment on or make changes to this bug.