Bug 835802 - Part 4: Support more phonebook sets when updating ICC contact. r=vicamo

This commit is contained in:
Yoshi Huang 2013-04-08 16:03:35 +08:00
Родитель 0652bf0e37
Коммит 4d28946e03
1 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -11671,18 +11671,19 @@ let ICCContactHelper = {
* @param onerror Callback to be called when error.
*/
updateUSimContact: function updateUSimContact(contact, onsuccess, onerror) {
let gotPbrCb = function gotPbrCb(pbr) {
if (pbr.adn) {
ICCRecordHelper.updateADNLike(pbr.adn.fileId, contact, null, onsuccess, onerror);
} else {
if (onerror) {
onerror("Cannot access ADN.");
}
}
let gotPbrCb = function gotPbrCb(pbrs) {
let pbrIndex = Math.floor(contact.recordId / ICC_MAX_LINEAR_FIXED_RECORDS);
let pbr = pbrs[pbrIndex];
this.updatePhonebookSet(pbr, contact, onsuccess, onerror);
}.bind(this);
ICCRecordHelper.readPBR(gotPbrCb, onerror);
},
updatePhonebookSet: function updatePhonebookSet(pbr, contact, onsuccess, onerror) {
// TODO: Bug 859659, update EF_Email and EF_ANR.
ICCRecordHelper.updateADNLike(pbr.adn.fileId, contact, null, onsuccess, onerror);
}
};
let RuimRecordHelper = {