[b2g-bluetooth] Handle call status change

RESOLVED FIXED in mozilla18

Status

()

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

People

(Reporter: ericchou, Assigned: ericchou)

Tracking

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

Firefox Tracking Flags

(blocking-basecamp:+)

Details

(Whiteboard: [LOE:S])

Attachments

(2 attachments, 5 obsolete attachments)

(Assignee)

Description

5 years ago
In order to notify HS of call status change, we need to implement an listener to observe call status change.
(Assignee)

Updated

5 years ago
Assignee: nobody → echou
Blocks: 788300
blocking-basecamp: --- → ?
Whiteboard: [LOE:S]
(Assignee)

Comment 1

5 years ago
Created attachment 662476 [details] [diff] [review]
patch 1: v1: Basic functions for observing call status

Implementation of call status observer. Please note that "StartListening()" hasn't been called yet.
Attachment #662476 - Flags: review?(kyle)
blocking-basecamp: ? → +
Comment on attachment 662476 [details] [diff] [review]
patch 1: v1: Basic functions for observing call status

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

We should probably add checks for MOZ_B2G_RIL around the additions to the makefile, and at any place we might need to access the RIL. Idea looks decent though, only reason the r- is there is because MOZ_B2G_BT doesn't necessarily assume MOZ_B2G_RIL.

::: dom/bluetooth/BluetoothRilListener.cpp
@@ +62,5 @@
> +
> +bool
> +BluetoothRilListener::StartListening()
> +{
> +  nsCOMPtr<nsIRILContentHelper> ril = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);

You should check for service validity here.
Attachment #662476 - Flags: review?(kyle) → review-
(Assignee)

Comment 3

5 years ago
Created attachment 662801 [details] [diff] [review]
patch 1: v2: Basic functions for observing call status

Added MOZ_B2G_RIL check to Makefile & checked service availability.
Attachment #662476 - Attachment is obsolete: true
Attachment #662801 - Flags: review?(kyle)
(Assignee)

Comment 4

5 years ago
Created attachment 662804 [details] [diff] [review]
patch 2: v1: implement CallStateChanged

Followed spec to implement CallStateChanged function. Created a runnable for sending RING indicator every 3 seconds.
Attachment #662801 - Attachment is obsolete: true
Attachment #662801 - Flags: review?(kyle)
Attachment #662804 - Flags: review?(kyle)
(Assignee)

Comment 5

5 years ago
Created attachment 662805 [details] [diff] [review]
patch 1: v2: Basic functions for observing call status

Added MOZ_B2G_RIL check to Makefile & checked service availability.
Attachment #662805 - Flags: review?(kyle)
Comment on attachment 662804 [details] [diff] [review]
patch 2: v1: implement CallStateChanged

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

::: dom/bluetooth/BluetoothHfpManager.cpp
@@ +206,5 @@
>    SendSocketData(new mozilla::ipc::SocketRawData(msg.get()));
>  }
>  
> +/*
> + * CallStateChanged will be called whenever call status is changed, and it 

Nit: space at end of line
Attachment #662804 - Flags: review?(kyle) → review+
Comment on attachment 662805 [details] [diff] [review]
patch 1: v2: Basic functions for observing call status

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

::: dom/bluetooth/BluetoothRilListener.cpp
@@ +64,5 @@
> +BluetoothRilListener::StartListening()
> +{
> +  nsCOMPtr<nsIRILContentHelper> ril = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
> +  if (!ril) {
> +    NS_ERROR("No RIL Service!"); 

Nit: space at end of line

@@ +77,5 @@
> +bool
> +BluetoothRilListener::StopListening()
> +{
> +  nsCOMPtr<nsIRILContentHelper> ril = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
> +   if (!ril) {

Nit: indentation

@@ +78,5 @@
> +BluetoothRilListener::StopListening()
> +{
> +  nsCOMPtr<nsIRILContentHelper> ril = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
> +   if (!ril) {
> +    NS_ERROR("No RIL Service!"); 

Nit: space at end of line

::: dom/bluetooth/Makefile.in
@@ +40,5 @@
>    $(NULL)
>  
> +ifdef MOZ_B2G_RIL
> +CPPSRCS += BluetoothRilListener.cpp \
> +  $(NULL)

Nit: Don't need the \ $(NULL)
Attachment #662805 - Flags: review?(kyle) → review+
(Assignee)

Comment 8

5 years ago
Created attachment 664874 [details] [diff] [review]
patch 1: final: Basic functions for observing call status, r=qdot

nits picked.
Attachment #662805 - Attachment is obsolete: true
(Assignee)

Comment 9

5 years ago
Created attachment 664875 [details] [diff] [review]
patch 2: final: Implemented CallStateChanged, r=qdot

Nit picked.
Attachment #662804 - Attachment is obsolete: true
(Assignee)

Comment 10

5 years ago
Created attachment 664979 [details] [diff] [review]
patch 2: final: Implemented CallStateChanged, r=qdot

NS_WARNING can only be passed one parameter.
Attachment #664875 - Attachment is obsolete: true
(Assignee)

Comment 11

5 years ago
try : https://tbpl.mozilla.org/?tree=Try&rev=9dc836798466
(Assignee)

Comment 12

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8bf5132fa243
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b839b6340fe
https://hg.mozilla.org/mozilla-central/rev/8bf5132fa243
https://hg.mozilla.org/mozilla-central/rev/9b839b6340fe
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.