Closed Bug 947086 Opened 9 years ago Closed 9 years ago

[Dialer] Dialer may call CDMA-specific bluetooth functions on non-CDMA phone


(Firefox OS Graveyard :: Gaia::Dialer, defect)

Gonk (Firefox OS)
Not set


(blocking-b2g:1.3+, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed)

1.3 C3/1.4 S3(31jan)
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed


(Reporter: jaliu, Assigned: mukeshk1990)




(1 file, 1 obsolete file)

BluetoothHfpManager::AnswerWaitingCall() is a CDMA-specific function.
holdAndAnswer() in calls_handler.js may call btHelper.answerWaitingCall(); in non-CDMA phone and trigger the assertion "MOZ_ASSERT(mPhoneType == PhoneType::CDMA)" in BluetoothHfpManager::AnswerWaitingCall().
The bug may crashes B2G when user hold a phone call on non-CDMA phone even the BT is unconnected to any devices.
The bug cause the assertion failed but it wouldn't crash B2G in release build.
Severity: major → normal
Hi Etienne,

As per my understanding,it looks to be a small fix in Calls_handler.js
I can work on this issue.
Please assign to me in case no one is working.
Flags: needinfo?(etienne)

Just click 'take' in 'Assign To:' field to take this bug, and ask for Etienne's review once you've done the fix. Thanks.
Flags: needinfo?(etienne)
assigning to Mukesh as per his request
Assignee: nobody → mukeshk1990
(In reply to Mukesh kumar from comment #2)
> Hi Etienne,
> As per my understanding,it looks to be a small fix in Calls_handler.js
> I can work on this issue.
> Please assign to me in case no one is working.

Awesome :)
Attached file Pointer to Pull Request.html (obsolete) —

Please check if this pull request can fix the issue.

Thank you.
Attachment #8364865 - Flags: review?(etienne)
Comment on attachment 8364865 [details]
Pointer to Pull Request.html

The code change looks good, but we need to add a unit test.

You can find some inspiration on how to test the |holdAndAnswer()| function here [1], how to test the bluetooth interactions there [2], and for the CDMA case you can look here [3].


Attachment #8364865 - Flags: review?(etienne)
Hi Etienne,

Thanks for your help.
Updated pull request with test case added.

Thank you.
Attachment #8364865 - Attachment is obsolete: true
Attachment #8365972 - Flags: review?(etienne)
Comment on attachment 8365972 [details]
Pointer to Pull Request.html

All good, thank!
Attachment #8365972 - Flags: review?(etienne) → review+
Whiteboard: 894457
Whiteboard: 894457

 Please merge the patch to master.
 The patch is reviewed and good to merge.
Just restarted the failing travis job, will land as soon as it's green.
Closed: 9 years ago
Resolution: --- → FIXED
Blocks: 979733
Request 1.3? per bug 979733 comment 5.
No longer blocks: 979733
Duplicate of this bug: 979733
Cert blocker. 1.3+.
blocking-b2g: --- → 1.3+
Please request approval-gaia-v1.3 on this patch when this is ready for uplift.
Mukesh/Etienne, can you help uplift the gaia fix to 1.3?

This bug becomes a 1.3 blocker since it fails BT certification test (bug 979733).
Flags: needinfo?(mukeshk1990)
Flags: needinfo?(etienne)
 I dont have the permission to uplift this to v1.3 train.

 Etienne, Can you help uplifting this to 1.3?

Flags: needinfo?(mukeshk1990)
Target Milestone: --- → 1.3 C3/1.4 S3(31jan)
You need to log in before you can comment on or make changes to this bug.