Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,60 @@
define(function() {
'use strict';
const NETWORK_TYPE_CATEGORY = {
'gprs': 'gsm',
'edge': 'gsm',
'umts': 'gsm',
'hsdpa': 'gsm',
'hsupa': 'gsm',
'hspa': 'gsm',
'hspa+': 'gsm',
'lte': 'gsm',
'gsm': 'gsm',
'is95a': 'cdma',
'is95b': 'cdma',
'1xrtt': 'cdma',
'evdo0': 'cdma',
'evdoa': 'cdma',
'evdob': 'cdma',
'ehrpd': 'cdma'
};
const CALL_FORWARD_REASON = {
'UNCONDITIONAL': 0,
'MOBILE_BUSY': 1,
'NO_REPLY': 2,
'NOT_REACHABLE': 3
};
const CALL_FORWARD_REASON_MAPPING = {
'unConditional': CALL_FORWARD_REASON.UNCONDITIONAL,
'mobileBusy': CALL_FORWARD_REASON.MOBILE_BUSY,
'noReply': CALL_FORWARD_REASON.NO_REPLY,
'notReachable': CALL_FORWARD_REASON.NOT_REACHABLE
};
const CALL_FORWARD_ACTION = {
'DISABLE': 0,
'ENABLE': 1,
'QUERY_STATUS': 2,
'REGISTRATION': 3,
'ERASURE': 4
};
const CLIR_MAPPING = {
'CLIR_DEFAULT': 0,
'CLIR_INVOCATION': 1,
'CLIR_SUPPRESSION': 2
};
const CallConstant = {
'NETWORK_TYPE_CATEGORY': NETWORK_TYPE_CATEGORY,
'CALL_FORWARD_REASON': CALL_FORWARD_REASON,
'CALL_FORWARD_REASON_MAPPING': CALL_FORWARD_REASON_MAPPING,
'CALL_FORWARD_ACTION': CALL_FORWARD_ACTION,
'CLIR_MAPPING': CLIR_MAPPING
};
return CallConstant;
});

View file

@ -0,0 +1,255 @@
/**
* Make sure all operations would be executed one by one.
*
* @module call/call_forwarding
*/
define(function(require) {
'use strict';
var CallSettingsTaskScheduler =
require('panels/call/call_settings_task_scheduler');
var Module = require('modules/base/module');
var Observable = require('modules/mvvm/observable');
var CallUtils = require('panels/call/call_utils');
var CallConstant = require('panels/call/call_constant');
var mozSettings = window.navigator.mozSettings;
/**
* @class CallForwarding
* @returns {CallForwarding}
*/
var CallForwarding = Module.create(function CallForwarding(cardIndex) {
this.super(Observable).call(this);
this._cardIndex = cardIndex;
this._cfReasonStates = [0, 0, 0, 0];
}).extend(Observable);
Observable.defineObservableProperty(CallForwarding.prototype, 'state', {
readonly: true,
value: 'normal'
});
// This will create following observable properties :
//
// unConditionalNumber
// unConditionalEnabled
// mobileBusyNumber
// mobileBusyEnabled
// noReplyNumber
// noReplyEnabled
// notReachableNumber
// notReachableEnabled
//
Object.keys(CallConstant.CALL_FORWARD_REASON_MAPPING).forEach(
(cfOptionName) => {
Observable.defineObservableProperty(CallForwarding.prototype,
cfOptionName + 'Number', {
readonly: true,
value: null
});
Observable.defineObservableProperty(CallForwarding.prototype,
cfOptionName + 'Enabled', {
readonly: true,
value: false
});
});
/**
* This is an internal function that can help us get the right conn.
*
* @memberOf CallForwarding
* @return {MozMobileConnection}
*/
CallForwarding.prototype._getConn = function() {
var conn = window.navigator.mozMobileConnections[this._cardIndex];
if (!conn) {
this.throw('We can\'t find the conn object on card ' + this._cardIndex);
} else {
return conn;
}
};
/**
* We can use this function to setCallForwardingValues on each type based
* on passing options.key. And in order to make sure operations are safe,
* we will put it inside TaskScheduler to help us execute function one by one.
*
* @memberOf CallForwarding
* @param {Object} options
* @param {String} options.key
* @param {Number} options.number
* @param {Boolean} options.enabled
* @return {Promise}
*/
CallForwarding.prototype.setCallForwardingValues = function(options) {
this._state = 'requesting';
var promise = new Promise((resolve, reject) => {
var conn = this._getConn(this._cardIndex);
var key = options.key;
var number = options.number;
var enabled = !!options.enabled;
if (!key) {
this._state = 'normal';
reject();
} else if (this._cfReasonStates[
CallConstant.CALL_FORWARD_REASON_MAPPING[key]] === enabled) {
// Bails out in case the reason is already enabled/disabled.
this._state = 'normal';
reject();
} else {
var mozMobileCFInfo = {};
mozMobileCFInfo.action = enabled ?
CallConstant.CALL_FORWARD_ACTION.REGISTRATION :
CallConstant.CALL_FORWARD_ACTION.DISABLE;
mozMobileCFInfo.reason =
CallConstant.CALL_FORWARD_REASON_MAPPING[key];
mozMobileCFInfo.serviceClass = conn.ICC_SERVICE_CLASS_VOICE;
// we only have to check phone's number when it is enabled
if (enabled && !CallUtils.isPhoneNumberValid(number)) {
this._state = 'normal';
reject({
name: 'callForwardingInvalidNumberError'
});
} else {
mozMobileCFInfo.number = number;
mozMobileCFInfo.timeSeconds =
mozMobileCFInfo.reason !=
CallConstant.CALL_FORWARD_REASON.NO_REPLY ? 0 : 20;
CallSettingsTaskScheduler.enqueue({
type: 'CALL_FORWARDING',
func: () => {
return conn.setCallForwardingOption(mozMobileCFInfo);
}
}).then(() => {
this._state = 'normal';
resolve({
key: key,
action: mozMobileCFInfo.action
});
}).catch(() => {
this._state = 'normal';
reject({
name: 'callForwardingSetError'
});
});
}
}
});
return promise;
};
/**
* We can use this function to get specific call forwarding option.
*
* @memberOf CallForwarding
* @param {String} optionName
* @return {Promise}
*/
CallForwarding.prototype._getOption = function(optionName) {
var conn = this._getConn();
if (!(optionName in CallConstant.CALL_FORWARD_REASON)) {
this.debug('Your optionName may be wrong - ', optionName);
return Promise.reject();
}
return conn.getCallForwardingOption(
CallConstant.CALL_FORWARD_REASON[optionName]);
};
/**
* We can get all call forwarding related options at the same time.
*
* @memberOf CallForwarding
* @return {Promise}
*/
CallForwarding.prototype.refresh = function() {
this._state = 'requesting';
return CallSettingsTaskScheduler.enqueue({
type: 'CALL_FORWARDING',
func: () => {
return Promise.all([
this._getOption('UNCONDITIONAL'),
this._getOption('MOBILE_BUSY'),
this._getOption('NO_REPLY'),
this._getOption('NOT_REACHABLE')
]);
}
}).then((results) => {
var promise = new Promise((resolve, reject) => {
var storedOptions = {};
var cfOptions = {
'unConditional': results[0],
'mobileBusy': results[1],
'noReply': results[2],
'notReachable': results[3]
};
Object.keys(cfOptions).forEach(function(cfOptionName) {
var rules = cfOptions[cfOptionName];
var rule = CallUtils.findActiveVoiceRule(rules);
if (rule) {
this._cfReasonStates[
CallConstant.CALL_FORWARD_REASON_MAPPING[cfOptionName]] = 1;
this['_' + cfOptionName + 'Number'] = rule.number;
this['_' + cfOptionName + 'Enabled'] = true;
if (cfOptionName === 'unConditional') {
// Send the latest query result from carrier to system app
storedOptions['ril.cf.carrier.enabled'] = {
enabled: true,
index: this._cardIndex
};
}
} else {
this._cfReasonStates[
CallConstant.CALL_FORWARD_REASON_MAPPING[cfOptionName]] = 0;
this['_' + cfOptionName + 'Number'] = '';
this['_' + cfOptionName + 'Enabled'] = false;
// Send the latest query result from carrier to system app
if (cfOptionName === 'unConditional') {
storedOptions['ril.cf.carrier.enabled'] = {
enabled: false,
index: this._cardIndex
};
}
}
}, this);
mozSettings.createLock().set(storedOptions).then(() => {
this._state = 'normal';
resolve(cfOptions);
}, () => {
this._state = 'error';
this.error('Something error happened when storing into settings db');
reject();
});
});
return promise;
}, () => {
this._state = 'error';
this.error('Something error happened when refresh');
});
};
/**
* Know whether unconditional call forwarding is set on this simcard.
*
* @memberOf CallForwarding
* @return {Boolean}
*/
CallForwarding.prototype.isUnconditionalCFOn = function() {
return this._cfReasonStates[0] === 1;
};
return CallForwarding;
});

View file

@ -0,0 +1,65 @@
/**
* This is the wrapper of TaskScheduler for Call Settings use.
*
* @module call/call_settings_task_scheduler
*/
define(function(require) {
'use strict';
var Module = require('modules/base/module');
var TaskScheduler = require('modules/base/task_scheduler');
/**
* @class CallSettingsTaskScheduler
* @returns {CallSettingsTaskScheduler}
*/
var CallSettingsTaskScheduler =
Module.create(function CallSettingsTaskScheduler() {
this.super(TaskScheduler).call(this);
}).extend(TaskScheduler);
const TASK_TYPE = {
GENERAL: 0,
CALL_FORWARDING: 1,
CALL_WAITING: 2,
CALLER_ID_PREF: 3
};
/**
* @memberOf CallSettingsTaskScheduler
* @static
*/
Object.defineProperty(CallSettingsTaskScheduler, 'TASK_TYPE', {
enumerable: true,
configurable: false,
get: function() {
return TASK_TYPE;
}
});
/**
* We will let pre-defined task_type pass here and then pass it
* to TaskScheduler.
*
* @param {Object} task
* @param {String} task.type
* @param {Function} task.func
* @memberOf CallSettingsTaskScheduler
* @return {Promise}
*/
CallSettingsTaskScheduler.prototype.enqueue = function(task) {
var {type, func} = task;
if (!CallSettingsTaskScheduler.TASK_TYPE[type]) {
this.throw('You are enqueuing an unknown type - ', type,
'please check again');
} else {
return TaskScheduler.prototype.enqueue.call(this, {
type: type,
func: func,
cancelable: (type !== 'GENERAL')
});
}
};
return CallSettingsTaskScheduler();
});

View file

@ -0,0 +1,41 @@
define(function() {
'use strict';
var conns = window.navigator.mozMobileConnections;
var CallUtils = {
/**
* Helper function. Check whether the phone number is valid or not.
*
* @param {String} number The phone number to check.
* @return {Boolean} Result.
*/
isPhoneNumberValid: function(number) {
if (number) {
var re = /^([\+]*[0-9])+$/;
if (re.test(number)) {
return true;
}
}
return false;
},
/**
* Find needed voice rule from passed-in rules. It is possible to have
* different rules here, but after checking with Gecko gurus, we only
* use "voice rule" now. So, we only need this one.
*
* @param {Array} rules
* @return {Object}
*/
findActiveVoiceRule: function(rules) {
rules = rules || [];
return rules.find((rule) => {
return (rule.active &&
(rule.serviceClass & conns[0].ICC_SERVICE_CLASS_VOICE) !==0);
});
}
};
return CallUtils;
});

View file

@ -0,0 +1,466 @@
define(function(require) {
'use strict';
var CallSettingsTaskScheduler =
require('panels/call/call_settings_task_scheduler');
var CallConstant = require('panels/call/call_constant');
var SettingsHelper = require('shared/settings_helper');
var SettingsPanel = require('modules/settings_panel');
var SettingsCache = require('modules/settings_cache');
var SettingsService = require('modules/settings_service');
var DsdsSettings = require('dsds_settings');
var DialogService = require('modules/dialog_service');
return function ctor_call_panel() {
return SettingsPanel({
onInit: function(panel, options) {
this._cardIndex = options.cardIndex || 0;
this._conns = window.navigator.mozMobileConnections;
this._conn = this._conns[this._cardIndex];
var $ = function(selector) {
return panel.querySelector(selector);
};
this._elements = {
panel: panel,
header: $('gaia-header'),
rilCallerId: $('#ril-callerId'),
fdnDesc: $('#fdnSettings-desc'),
alertPanel: $('.cw-alert'),
alertPanelSetButton: $('.cw-alert .cw-alert-set'),
alertPanelConfirmInput: $('.cw-alert .cw-alert-checkbox'),
alertPanelCancelButton: $('.cw-alert .cw-alert-cancel'),
alertLabel: $('#menuItem-callWaiting .cw-alert-icon'),
callFdnItem: $('#menuItem-callFdn'),
callFdnAnchor: $('#menuItem-callFdn a'),
callWaitingItem: $('#menuItem-callWaiting'),
callWaitingInput: $('#menuItem-callWaiting gaia-switch'),
callForwardingItem: $('#menuItem-callForwarding'),
callForwardingAnchor: $('#menuItem-callForwarding a'),
callBarringItem: $('#menuItem-callBarring'),
callerIdItem: $('#menuItem-callerId'),
voiceMailItem: $('.menuItem-voicemail'),
voiceMailDesc: $('#voiceMail-desc'),
voicePrivacyItem: $('#menuItem-voicePrivacyMode'),
voicePrivacyInput: $('#menuItem-voicePrivacyMode gaia-switch')
};
// Set the navigation correctly when on a multi ICC card device.
if (DsdsSettings.getNumberOfIccSlots() > 1) {
this._elements.header.setAttribute('data-href', '#call-iccs');
}
this._bindPanelReadyEvent();
this._bindCallForwardingMenuItemClickEvent();
this._bindCallFdnMenuItemClickEvent();
this._addVoiceTypeChangeListeners();
this._initCallerId();
this._initCallWaiting();
this._initVoiceMailSettings();
this._initVoicePrivacyModeChangeEvent();
this._initVoicemailClickEvent();
this._initCallWaitingAlertLabelClickEvent();
this._initCallWaitingAlertCancelButtonClickEvent();
CallSettingsTaskScheduler.observe('isLocked', (isLocked) => {
this._enableTapOn('callerIdItem', !isLocked);
this._enableTapOn('callWaitingInput', !isLocked);
});
this._refreshCallSettingItems();
},
onBeforeShow: function(panel, options) {
if (typeof options.cardIndex !== 'undefined') {
this._cardIndex = options.cardIndex;
this._conn = this._conns[options.cardIndex];
}
this._initFDNItem();
this._updateNetworkTypeLimitedItemsVisibility(
this._conn.voice && this._conn.voice.type);
this._refreshCallSettingItems();
},
_bindPanelReadyEvent: function() {
window.addEventListener('panelready', (evt) => {
switch (evt.detail.current) {
case '#call':
// No need to refresh the call settings items if navigated from
// panels not manipulating call settings.
if (evt.detail.previous === '#call-forwarding' ||
evt.detail.previous === '#call-cbSettings') {
return;
}
break;
}
});
},
_bindCallForwardingMenuItemClickEvent: function() {
this._elements.callForwardingAnchor.onclick = () => {
SettingsService.navigate('call-forwarding', {
cardIndex: this._cardIndex
});
};
},
_bindCallFdnMenuItemClickEvent: function() {
this._elements.callFdnAnchor.onclick = () => {
SettingsService.navigate('call-fdnSettings', {
cardIndex: this._cardIndex
});
};
},
_initCallerId: function() {
// We listen for blur events so that way we set the CLIR mode once the
// user clicks on the OK button.
this._elements.rilCallerId.onblur = () => {
var clirMode = CallConstant.CLIR_MAPPING[
this._elements.rilCallerId.value];
this._conn.setCallingLineIdRestriction(clirMode).then(() => {
// If the setting success, system app will sync the value.
}, () => {
// If the setting fails,
// we force sync the value here and update the UI.
this._updateCallerIdPreference().then(() => {
this._updateCallerIdItemState();
});
});
};
// System app will sync the value 'ril.clirMode' with the carrier
navigator.mozSettings.addObserver('ril.clirMode', () => {
this._updateCallerIdItemState();
});
},
_initCallWaiting: function() {
this._elements.alertPanelSetButton.onclick = () => {
var checked = this._elements.alertPanelConfirmInput.checked;
this._conn.setCallWaitingOption(checked).then(() => {
this._elements.alertPanel.hidden = true;
this._updateCallWaitingItemState();
}, () => {
this._elements.alertPanel.hidden = true;
this._updateCallWaitingItemState();
});
};
// Bind call waiting setting to the input
this._elements.callWaitingInput.addEventListener('change', () => {
var checked = this._elements.callWaitingInput.checked;
this._conn.setCallWaitingOption(checked).then(() => {
this._updateCallWaitingItemState();
}, () => {
this._updateCallWaitingItemState();
});
});
},
_initVoiceMailSettings: function() {
// update all voice numbers if necessary
SettingsCache.getSettings((results) => {
var settings = navigator.mozSettings;
var voicemail = navigator.mozVoicemail;
var updateVMNumber = false;
var numbers = results['ril.iccInfo.mbdn'] || [];
[].forEach.call(this._conns, (conn, index) => {
var number = numbers[index];
// If the voicemail number has not been stored into the database yet
// we check whether the number is provided by the mozVoicemail API.
// In that case we store it into the setting database.
if (!number && voicemail) {
number = voicemail.getNumber(index);
if (number) {
updateVMNumber = true;
numbers[index] = number;
}
}
});
if (updateVMNumber) {
settings.createLock().set({
'ril.iccInfo.mbdn': numbers
}).then(() => {
this._updateVoiceMailItemState();
settings.addObserver('ril.iccInfo.mbdn', () => {
this._updateVoiceMailItemState();
});
});
} else {
this._updateVoiceMailItemState();
settings.addObserver('ril.iccInfo.mbdn', () => {
this._updateVoiceMailItemState();
});
}
});
},
_initFDNItem: function() {
var iccId = navigator.mozMobileConnections[this._cardIndex].iccId;
if (iccId) {
var icc = navigator.mozIccManager.getIccById(iccId);
if (icc) {
icc.getServiceState('fdn').then((hasFdn) => {
this._elements.callFdnItem.hidden = !hasFdn;
});
}
}
},
_initVoicemailClickEvent: function() {
this._elements.voiceMailItem.onclick = () => {
DialogService.show('call-voiceMailSettings');
};
},
_initCallWaitingAlertLabelClickEvent: function() {
this._elements.alertLabel.onclick = () => {
this._elements.alertPanelConfirmInput.checked = false;
this._elements.alertPanel.hidden = false;
};
},
_initVoicePrivacyModeChangeEvent: function() {
var defaultVoicePrivacySettings = [].map.call(this._conns, () => {
return false;
});
var voicePrivacyHelper = SettingsHelper(
'ril.voicePrivacy.enabled', defaultVoicePrivacySettings);
this._elements.voicePrivacyInput.addEventListener('change', () => {
var checked = this._elements.voicePrivacyInput.checked;
voicePrivacyHelper.get((values) => {
var originalValue = !checked;
this._conn.setVoicePrivacyMode(checked).then(() => {
values[this._cardIndex] = !originalValue;
voicePrivacyHelper.set(values);
}, () => {
// restore the value if failed.
this._elements.voicePrivacyInput.checked = originalValue;
});
});
});
},
_initCallWaitingAlertCancelButtonClickEvent: function() {
this._elements.alertPanelCancelButton.onclick = () => {
this._elements.alertPanel.hidden = true;
};
},
_addVoiceTypeChangeListeners: function() {
var voiceTypes = [].map.call(this._conns, () => {
return null;
});
[].forEach.call(this._conns, (conn, index) => {
voiceTypes[index] = conn.voice.type;
conn.addEventListener('voicechange', () => {
var newType = conn.voice.type;
if (index !== this._cardIndex || voiceTypes[index] === newType) {
return;
}
voiceTypes[index] = newType;
this._updateNetworkTypeLimitedItemsVisibility(newType);
this._refreshCallSettingItems();
});
});
},
_updateNetworkTypeLimitedItemsVisibility: function(voiceType) {
// The following features are limited to GSM types.
this._elements.callForwardingItem.hidden =
this._elements.callBarringItem.hidden =
this._elements.callWaitingItem.hidden =
this._elements.callerIdItem.hidden =
(CallConstant.NETWORK_TYPE_CATEGORY[voiceType] !== 'gsm');
// The following feature is limited to CDMA types.
this._elements.voicePrivacyItem.hidden =
(CallConstant.NETWORK_TYPE_CATEGORY[voiceType] !== 'cdma');
},
_refreshCallSettingItems: function() {
this._updateVoiceMailItemState();
this._updateFdnStatus();
this._updateVoicePrivacyItemState();
this._updateCallerIdPreference().then(() => {
this._updateCallerIdItemState();
});
this._updateCallWaitingItemState();
},
_enableTapOn: function(elementName, enable) {
var element = this._elements[elementName];
if (!element) {
return;
}
if (enable) {
element.removeAttribute('aria-disabled');
} else {
element.setAttribute('aria-disabled', true);
}
},
_updateCallerIdPreference: function() {
// TODO
// move this into separate module like CallForwarding
return CallSettingsTaskScheduler.enqueue({
type: 'CALLER_ID_PREF',
func: () => {
return this._conn.getCallingLineIdRestriction();
}
}).then((result) => {
var promise = new Promise((resolve) => {
var value = 0; //CLIR_DEFAULT
// In some legitimates error cases (FdnCheckFailure),
// the req.result is undefined. This is fine, we want this,
// and in this case we will just display an error message
// for all the matching requests.
if (result) {
switch (result.m) {
case 1: // Permanently provisioned
case 3: // Temporary presentation disallowed
case 4: // Temporary presentation allowed
switch (result.n) {
case 1: // CLIR invoked, CLIR_INVOCATION
case 2: // CLIR suppressed, CLIR_SUPPRESSION
case 0: // Network default, CLIR_DEFAULT
value = result.n; //'CLIR_INVOCATION'
break;
default:
value = 0; //CLIR_DEFAULT
break;
}
break;
case 0: // Not Provisioned
case 2: // Unknown (network error, etc)
/* fall through */
default:
value = 0; //CLIR_DEFAULT
break;
}
SettingsCache.getSettings((results) => {
var preferences = results['ril.clirMode'] || [0, 0];
preferences[this._cardIndex] = value;
navigator.mozSettings.createLock().set({
'ril.clirMode': preferences
}).then(resolve, resolve);
});
}
});
return promise;
});
},
_updateCallerIdItemState: function() {
if (this._elements.callerIdItem.hidden) {
return Promise.resolve();
} else {
var promise = new Promise((resolve) => {
SettingsCache.getSettings((results) => {
var preferences = results['ril.clirMode'];
var preference = preferences && preferences[this._cardIndex];
var value;
switch (preference) {
case 1: // CLIR invoked
value = 'CLIR_INVOCATION';
break;
case 2: // CLIR suppressed
value = 'CLIR_SUPPRESSION';
break;
case 0: // Network default
/* fall through */
default:
value = 'CLIR_DEFAULT';
break;
}
this._elements.rilCallerId.value = value;
});
});
return promise;
}
},
_updateCallWaitingItemState: function() {
if (this._elements.callWaitingItem.hidden) {
return Promise.resolve();
} else {
// TODO
// move this into separate module like CallForwarding
return CallSettingsTaskScheduler.enqueue({
type: 'CALL_WAITING',
func: () => {
return this._conn.getCallWaitingOption();
}
}).then((enabled) => {
this._elements.callWaitingInput.checked = enabled;
if (enabled) {
this._elements.callWaitingItem.dataset.state = 'on';
} else {
this._elements.callWaitingItem.dataset.state = 'off';
}
}).catch(() => {
this._elements.callWaitingItem.dataset.state = 'unknown';
});
}
},
_updateVoiceMailItemState: function() {
this._elements.voiceMailDesc.textContent = '';
SettingsCache.getSettings((results) => {
var numbers = results['ril.iccInfo.mbdn'];
var number = numbers[this._cardIndex];
if (number) {
this._elements.voiceMailDesc.removeAttribute('data-l10n-id');
this._elements.voiceMailDesc.textContent = number;
} else {
this._elements.voiceMailDesc.setAttribute(
'data-l10n-id', 'voiceMail-number-notSet');
}
});
},
_updateVoicePrivacyItemState: function() {
if (this._elements.voicePrivacyItem.hidden) {
return;
}
this._conn.getVoicePrivacyMode().then((enabled) => {
this._elements.voicePrivacyInput.checked = enabled;
}, (error) => {
console.log('get voice privacy mode error');
console.log(error);
});
},
_updateFdnStatus: function() {
var iccId = navigator.mozMobileConnections[this._cardIndex].iccId;
if (iccId) {
var icc = navigator.mozIccManager.getIccById(iccId);
if (icc) {
icc.getCardLock('fdn').then((result) => {
var enabled = result.enabled;
this._elements.fdnDesc.setAttribute('data-l10n-id',
enabled ? 'enabled' : 'disabled');
this._elements.callForwardingItem.hidden = enabled;
});
}
}
}
});
};
});