[b2g-bluetooth] Broadcast dialer-related system message

RESOLVED FIXED in mozilla18

Status

()

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

People

(Reporter: gyeh, Assigned: gyeh)

Tracking

unspecified
mozilla18
ARM
Gonk (Firefox OS)
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(blocking-basecamp:+)

Details

(Whiteboard: [LOE:S])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
For the following actions, we have to broadcast system message to dialer app:

  * Accept an incoming voice call (ATA)
  * Terminate a call (AT+CHUP)
  * Place a call to the last number dialed (AT+BLDN)

The topic of system message is "bluetooth-dialer-command", and the message will be like {"command":"ATA"}/{"command":"CHUP"}/{"command":"BLDN"}.
(Assignee)

Comment 1

5 years ago
Created attachment 664410 [details] [diff] [review]
v1 patch
Attachment #664410 - Flags: review?(kyle)
Comment on attachment 664410 [details] [diff] [review]
v1 patch

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

::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +67,5 @@
>  {
> +  mListener = nullptr;
> +  if (!mListener->StopListening()) {
> +    NS_WARNING("Failed to stop listening RIL");
> +  }

So you set it to null, then you call a function on it... ?

::: dom/bluetooth/BluetoothHfpManager.h
@@ +38,4 @@
>    int mCurrentVgs;
>    int mCurrentCallIndex;
>    int mCurrentCallState;
> +  BluetoothRilListener *mListener;

nsAutoPtr
Attachment #664410 - Flags: review?(kyle) → review-
(Assignee)

Comment 3

5 years ago
Created attachment 665227 [details] [diff] [review]
v2 patch
Attachment #664410 - Attachment is obsolete: true
Attachment #665227 - Flags: review?(kyle)
Comment on attachment 665227 [details] [diff] [review]
v2 patch

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

::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +55,5 @@
> +  if (!mListener->StartListening()) {
> +    NS_WARNING("Failed to start listening RIL");
> +  }
> +
> +  if (!sHfpCommandThread) {

Not a blocker, but possibly for a followup: How many things are we going to be running through this thread? Seems like we could probably just create the thread when ringing otherwise.
Attachment #665227 - Flags: review?(kyle) → review+
https://hg.mozilla.org/try/rev/89e0c137c226
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d293910d01e
https://hg.mozilla.org/mozilla-central/rev/6d293910d01e
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.