зеркало из https://github.com/mozilla/gecko-dev.git
Bug 997584 - part 1 - remove kPrefClirModePreference. r=vicamo
This commit is contained in:
Родитель
0379331dd7
Коммит
a2273eb78a
|
@ -1378,6 +1378,13 @@ RILContentHelper.prototype = {
|
|||
let request = Services.DOMRequest.createRequest(window);
|
||||
let requestId = this.getRequestId(request);
|
||||
|
||||
let radioState = this.rilContexts[clientId].radioState;
|
||||
if (radioState !== RIL.GECKO_DETAILED_RADIOSTATE_ENABLED) {
|
||||
this.dispatchFireRequestError(requestId,
|
||||
RIL.GECKO_ERROR_RADIO_NOT_AVAILABLE);
|
||||
return request;
|
||||
}
|
||||
|
||||
cpmm.sendAsyncMessage("RIL:GetCallingLineIdRestriction", {
|
||||
clientId: clientId,
|
||||
data: {
|
||||
|
@ -1389,7 +1396,6 @@ RILContentHelper.prototype = {
|
|||
},
|
||||
|
||||
setCallingLineIdRestriction: function(clientId, window, clirMode) {
|
||||
|
||||
if (window == null) {
|
||||
throw Components.Exception("Can't get window object",
|
||||
Cr.NS_ERROR_UNEXPECTED);
|
||||
|
@ -1397,6 +1403,13 @@ RILContentHelper.prototype = {
|
|||
let request = Services.DOMRequest.createRequest(window);
|
||||
let requestId = this.getRequestId(request);
|
||||
|
||||
let radioState = this.rilContexts[clientId].radioState;
|
||||
if (radioState !== RIL.GECKO_DETAILED_RADIOSTATE_ENABLED) {
|
||||
this.dispatchFireRequestError(requestId,
|
||||
RIL.GECKO_ERROR_RADIO_NOT_AVAILABLE);
|
||||
return request;
|
||||
}
|
||||
|
||||
cpmm.sendAsyncMessage("RIL:SetCallingLineIdRestriction", {
|
||||
clientId: clientId,
|
||||
data: {
|
||||
|
|
|
@ -96,7 +96,6 @@ const kSettingsTimezoneAutoUpdateAvailable = "time.timezone.automatic-update.ava
|
|||
const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed";
|
||||
|
||||
const kPrefCellBroadcastDisabled = "ril.cellbroadcast.disabled";
|
||||
const kPrefClirModePreference = "ril.clirMode";
|
||||
const kPrefRilNumRadioInterfaces = "ril.numRadioInterfaces";
|
||||
|
||||
const DOM_MOBILE_MESSAGE_DELIVERY_RECEIVED = "received";
|
||||
|
@ -1623,7 +1622,6 @@ WorkerMessenger.prototype = {
|
|||
let options = {
|
||||
debug: DEBUG,
|
||||
cellBroadcastDisabled: false,
|
||||
clirMode: RIL.CLIR_DEFAULT,
|
||||
quirks: {
|
||||
callstateExtraUint32:
|
||||
libcutils.property_get("ro.moz.ril.callstate_extra_int", "false") === "true",
|
||||
|
@ -1651,10 +1649,6 @@ WorkerMessenger.prototype = {
|
|||
Services.prefs.getBoolPref(kPrefCellBroadcastDisabled);
|
||||
} catch(e) {}
|
||||
|
||||
try {
|
||||
options.clirMode = Services.prefs.getIntPref(kPrefClirModePreference);
|
||||
} catch(e) {}
|
||||
|
||||
this.send(null, "setInitialOptions", options);
|
||||
},
|
||||
|
||||
|
@ -3502,16 +3496,6 @@ RadioInterface.prototype = {
|
|||
this.clientId, message);
|
||||
},
|
||||
|
||||
_updateCallingLineIdRestrictionPref: function(mode) {
|
||||
try {
|
||||
Services.prefs.setIntPref(kPrefClirModePreference, mode);
|
||||
Services.prefs.savePrefFile(null);
|
||||
if (DEBUG) {
|
||||
this.debug(kPrefClirModePreference + " pref is now " + mode);
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
|
||||
sendMMI: function(target, message) {
|
||||
if (DEBUG) this.debug("SendMMI " + JSON.stringify(message));
|
||||
this.workerMessenger.send("sendMMI", message, (function(response) {
|
||||
|
@ -3519,7 +3503,6 @@ RadioInterface.prototype = {
|
|||
this._sendCfStateChanged(response);
|
||||
} else if (response.isSetCLIR && response.success) {
|
||||
this._sendClirModeChanged(response.clirMode);
|
||||
this._updateCallingLineIdRestrictionPref(response.clirMode);
|
||||
}
|
||||
|
||||
target.sendAsyncMessage("RIL:SendMMI", {
|
||||
|
@ -3550,7 +3533,6 @@ RadioInterface.prototype = {
|
|||
this.workerMessenger.send("setCLIR", message, (function(response) {
|
||||
if (response.success) {
|
||||
this._sendClirModeChanged(response.clirMode);
|
||||
this._updateCallingLineIdRestrictionPref(response.clirMode);
|
||||
}
|
||||
target.sendAsyncMessage("RIL:SetCallingLineIdRestriction", {
|
||||
clientId: this.clientId,
|
||||
|
|
|
@ -53,7 +53,6 @@ if (!this.debug) {
|
|||
}
|
||||
|
||||
let RIL_CELLBROADCAST_DISABLED;
|
||||
let RIL_CLIR_MODE;
|
||||
let RIL_EMERGENCY_NUMBERS;
|
||||
const DEFAULT_EMERGENCY_NUMBERS = ["112", "911"];
|
||||
|
||||
|
@ -226,7 +225,6 @@ function RilObject(aContext) {
|
|||
// Init properties that are only initialized once.
|
||||
this.v5Legacy = RILQUIRKS_V5_LEGACY;
|
||||
this.cellBroadcastDisabled = RIL_CELLBROADCAST_DISABLED;
|
||||
this.clirMode = RIL_CLIR_MODE;
|
||||
|
||||
this._hasHangUpPendingOutgoingCall = false;
|
||||
}
|
||||
|
@ -271,11 +269,6 @@ RilObject.prototype = {
|
|||
*/
|
||||
cellBroadcastDisabled: false,
|
||||
|
||||
/**
|
||||
* Global CLIR mode settings.
|
||||
*/
|
||||
clirMode: CLIR_DEFAULT,
|
||||
|
||||
/**
|
||||
* Parsed Cell Broadcast search lists.
|
||||
* cellBroadcastConfigs.MMI should be preserved over rild reset.
|
||||
|
@ -1121,13 +1114,10 @@ RilObject.prototype = {
|
|||
* nsIDOMMozMobileConnection interface.
|
||||
*/
|
||||
setCLIR: function(options) {
|
||||
if (options) {
|
||||
this.clirMode = options.clirMode;
|
||||
}
|
||||
let Buf = this.context.Buf;
|
||||
Buf.newParcel(REQUEST_SET_CLIR, options);
|
||||
Buf.writeInt32(1);
|
||||
Buf.writeInt32(this.clirMode);
|
||||
Buf.writeInt32(options.clirMode);
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -6489,7 +6479,6 @@ RilObject.prototype[UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED] = function UNSOLIC
|
|||
this.getBasebandVersion();
|
||||
this.updateCellBroadcastConfig();
|
||||
this.setPreferredNetworkType();
|
||||
this.setCLIR();
|
||||
if ((RILQUIRKS_DATA_REGISTRATION_ON_DEMAND ||
|
||||
RILQUIRKS_SUBSCRIPTION_CONTROL) &&
|
||||
this._attachDataRegistration) {
|
||||
|
@ -14747,7 +14736,6 @@ let ContextPool = {
|
|||
DEBUG = DEBUG_WORKER || aOptions.debug;
|
||||
RIL_EMERGENCY_NUMBERS = aOptions.rilEmergencyNumbers;
|
||||
RIL_CELLBROADCAST_DISABLED = aOptions.cellBroadcastDisabled;
|
||||
RIL_CLIR_MODE = aOptions.clirMode;
|
||||
|
||||
let quirks = aOptions.quirks;
|
||||
RILQUIRKS_CALLSTATE_EXTRA_UINT32 = quirks.callstateExtraUint32;
|
||||
|
|
Загрузка…
Ссылка в новой задаче