mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 793073 - B2G RIL: Quickly tapping Airplane Mode causes phone keeping in Emergency Calls Only. r=philikon
This commit is contained in:
parent
e8b33a2308
commit
4d96e1fbb8
@ -787,6 +787,8 @@ RadioInterfaceLayer.prototype = {
|
||||
},
|
||||
|
||||
handleRadioStateChange: function handleRadioStateChange(message) {
|
||||
this._changingRadioPower = false;
|
||||
|
||||
let newState = message.radioState;
|
||||
if (this.rilContext.radioState == newState) {
|
||||
return;
|
||||
@ -815,6 +817,10 @@ RadioInterfaceLayer.prototype = {
|
||||
// yet. Wait for that.
|
||||
return;
|
||||
}
|
||||
if (this._changingRadioPower) {
|
||||
// We're changing the radio power currently, ignore any changes.
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.rilContext.radioState == RIL.GECKO_RADIOSTATE_OFF &&
|
||||
this._radioEnabled) {
|
||||
@ -1338,6 +1344,10 @@ RadioInterfaceLayer.prototype = {
|
||||
// corresponds to the 'ril.radio.disabled' setting from the UI.
|
||||
_radioEnabled: null,
|
||||
|
||||
// Flag to ignore any radio power change requests during We're changing
|
||||
// the radio power.
|
||||
_changingRadioPower: false,
|
||||
|
||||
// Flag to determine whether we reject a waiting call directly or we
|
||||
// notify the UI of a waiting call. It corresponds to the
|
||||
// 'ril.callwaiting.enbled' setting from the UI.
|
||||
@ -1433,6 +1443,7 @@ RadioInterfaceLayer.prototype = {
|
||||
|
||||
setRadioEnabled: function setRadioEnabled(value) {
|
||||
debug("Setting radio power to " + value);
|
||||
this._changingRadioPower = true;
|
||||
this.worker.postMessage({rilMessageType: "setRadioPower", on: value});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user