Closed
Bug 1124992
Opened 11 years ago
Closed 10 years ago
[Dialer] not need to listen to telephonyCallGroup.onerror but handle promise
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hsinyi, Assigned: gsvelto)
References
Details
Attachments
(1 file)
After bug 1095362, telephonyCallGroup.add, .remove, .hold and .resume return a Promise. Gaia should turn to use promise resolve/reject to get a request result, instead of relying telephonyCallGroup.onerror.
Comment 1•10 years ago
|
||
Gabriele,
Are you avaialble to work on this bug? We are willing to have this modification in gaia side. Then we could work on the furthur bug (bug 1124993) to deprecate telephonyCallGroup.onerror that make our API more clear and concise.
Flags: needinfo?(gsvelto)
Assignee | ||
Comment 2•10 years ago
|
||
Sure, I'm taking it.
Assignee: nobody → gsvelto
Flags: needinfo?(gsvelto)
Comment 3•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8613545 [details] [review]
[gaia] gabrielesvelto:bug-1043165-call-promise-error > mozilla-b2g:master
This is a mostly mechanical change from using onerror to catching the promise's failure with a small twist regarding l10n usage, here's a detailed description of the changes I made:
- CallScreen.showStatusMessage() now uses the argument passing convention described in [1] and internally sets the data-l10n-id getting rid of the deprecated mozL10n.get() use. I did it because we don't want to add new mozL10n.get() calls and the calls handler code would have required them otherwise to show the error message.
- In the calls handler code I've merged the functionality used to merge calls (no pun intended) under the mergeCalls() function. This code is now also responsible for showing the error message in case of failures and does so with proper localization. Unit-tests were adjusted accordingly.
- The conference group handler doesn't handle error codes anymore, related unit-tests were also removed.
- The HandledCall object was modified to cope with the new CallScreen.showStatusMessage() l10n id & args form. Unit-tests were adjusted accordingly.
[1] https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/localization_code_best_practices#Writing_APIs_that_operate_on_L10nIDs
Attachment #8613545 -
Flags: review?(thills)
Comment 5•10 years ago
|
||
Comment on attachment 8613545 [details] [review]
[gaia] gabrielesvelto:bug-1043165-call-promise-error > mozilla-b2g:master
Hi Gabriele,
This looks good. I think it's much nicer to use the promise. I did some testing as well.
Thanks,
-tamara
Attachment #8613545 -
Flags: review?(thills) → review+
Updated•10 years ago
|
Keywords: checkin-needed
Comment 7•10 years ago
|
||
http://docs.taskcluster.net/tools/task-graph-inspector/#rsnN-AV9TkeBdu3uB6sR8Q
The pull request failed to pass integration tests. It could not be landed, please try again.
Assignee | ||
Comment 8•10 years ago
|
||
Merged manually to gaia/master 330b6825fca18b2183fb8d7af5cb726724f48dd9 because auto-lander is not working for me:
https://github.com/mozilla-b2g/gaia/commit/330b6825fca18b2183fb8d7af5cb726724f48dd9
Try run is here:
https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=26206596b996b9c100b63fe5251ef19131f39480
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•