Closed
Bug 1147735
Opened 10 years ago
Closed 9 years ago
Deprecate TelephonyCall.onerror, TelephonyCall.error
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aknow, Assigned: gsvelto)
References
Details
Attachments
(1 file)
See
https://bugzilla.mozilla.org/show_bug.cgi?id=1043165#c0
for the reason why we'd like to refine the API and deprecate |TelephonyCall.onerror|, |TelephonyCall.error|.
After bug 1043165, we could retrieve the disconnected reason from |TelephonyCall.disconnectedReason| when a call changes its state to 'disconnected'. All the possible values are listed in TelephonyCall.webidl.
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
First WIP, this removes TelephonyCall.error from the dialer, I haven't checked all corner cases yet and how errors via the promise are handled. callscreen and emergency-call haven't been modified either yet.
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•9 years ago
|
||
Second WIP, now properly handling the |disconnectedReason| in both the dialer (to display error messages) and the callscreen (to play the busy tone).
Assignee | ||
Comment 4•9 years ago
|
||
Third WIP fixing a small issue and covering the emergency-call app. Things look in good shape, now to fix the unit-tests...
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8659804 [details]
[gaia] gabrielesvelto:bug-1147735-deprecate-telephonycall-error > mozilla-b2g:master
Here's a version of the patch in good shape, to summarize the changes:
- a small method was added to the TelephonyMessages helper to display message related to |disconnectedReason|. Note that the |disconnectedReason| field holds the same strings as the old error description minus the 'Error' suffix. So a call that gets rejected because the other side is busy will have |disconnectedReason| set to 'Busy' vs the old 'BusyError' error name that was returned by the onerror event.
- in the dialer the |onerror| event handler is replaced by using the call promise rejection to detect failure and by looking at |disconnectedReason| to figure out why a call ended (or failed to connect)
- likewise in the emergency call app
- in the dialer we use the |ondisconnected| event instead of the |onerror| to detect a busy line and play the busy tone
- all unit tests and mocks have been adjusted accordingly
Attachment #8659804 -
Flags: review?(drs)
Assignee | ||
Updated•9 years ago
|
Attachment #8659804 -
Flags: review?(drs)
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8659804 [details]
[gaia] gabrielesvelto:bug-1147735-deprecate-telephonycall-error > mozilla-b2g:master
Updated the PR, I've pushed a patch on top that merges the ondisconnected handlers into one and adjusts the unit-tests accordingly.
Attachment #8659804 -
Flags: review?(drs)
Assignee | ||
Comment 7•9 years ago
|
||
I've added another small patch that always rejects the call promise if we can't make a call. Previously we didn't return anything which is obviously wrong.
Comment 8•9 years ago
|
||
Comment on attachment 8659804 [details]
[gaia] gabrielesvelto:bug-1147735-deprecate-telephonycall-error > mozilla-b2g:master
Looks good, thanks.
Attachment #8659804 -
Flags: review?(drs) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Addressed the final nits and merged to gaia/master 4bf8e171a7ea3397901191a25765432594aaff2c
https://github.com/mozilla-b2g/gaia/commit/4bf8e171a7ea3397901191a25765432594aaff2c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•