Bug 964974 - Part 1: Dropping all active voice call when power off radio. r=hsinyi

This commit is contained in:
Edgar Chen 2014-02-06 12:31:53 +08:00
parent 1e33574dbb
commit 3b1a96c49f
2 changed files with 19 additions and 0 deletions

View File

@ -617,6 +617,16 @@ XPCOMUtils.defineLazyGetter(this, "gRadioEnabledController", function() {
radioInterface.receiveMessage(msg);
}).bind(this);
// In 2G network, modem takes 35+ seconds to process deactivate data
// call request if device has active voice call (please see bug 964974
// for more details). Therefore we should hangup all active voice calls
// first. And considering some DSDS architecture, toggling one radio may
// toggle both, so we send hangUpAll to all clients.
for (let i = 0, N = this.ril.numRadioInterfaces; i < N; ++i) {
let iface = this.ril.getRadioInterface(i);
iface.workerMessenger.send("hangUpAll");
}
// In some DSDS architecture with only one modem, toggling one radio may
// toggle both. Therefore, for safely turning off, we should first
// explicitly deactivate all data calls from all clients.

View File

@ -1420,6 +1420,15 @@ let RIL = {
Buf.sendParcel();
},
/**
* Hang up all calls
*/
hangUpAll: function() {
for (let callIndex in this.currentCalls) {
this.hangUp({callIndex: callIndex});
}
},
/**
* Hang up the phone.
*