Bug 835802 - Part 2: Rename getFreeRecordId to findFreeRecordId. r=vicamo

This commit is contained in:
Yoshi Huang 2013-04-09 11:57:57 +08:00
parent 5798818f1a
commit bb6b5fede0
2 changed files with 8 additions and 8 deletions

View File

@ -10834,13 +10834,13 @@ let ICCRecordHelper = {
},
/**
* Get free record id.
* Find free record id.
*
* @param fileId EF id.
* @param onsuccess Callback to be called when success.
* @param onerror Callback to be called when error.
*/
getFreeRecordId: function getFreeRecordId(fileId, onsuccess, onerror) {
findFreeRecordId: function findFreeRecordId(fileId, onsuccess, onerror) {
function callback(options) {
let strLen = Buf.readUint32();
let octetLen = strLen / 2;
@ -11352,12 +11352,12 @@ let ICCContactHelper = {
case "adn":
switch (appType) {
case CARD_APPTYPE_SIM:
ICCRecordHelper.getFreeRecordId(ICC_EF_ADN, onsuccess, onerror);
ICCRecordHelper.findFreeRecordId(ICC_EF_ADN, onsuccess, onerror);
break;
case CARD_APPTYPE_USIM:
let gotPbrCb = function gotPbrCb(pbr) {
if (pbr.adn) {
ICCRecordHelper.getFreeRecordId(pbr.adn.fileId, onsuccess, onerror);
ICCRecordHelper.findFreeRecordId(pbr.adn.fileId, onsuccess, onerror);
}
}.bind(this);
@ -11366,7 +11366,7 @@ let ICCContactHelper = {
}
break;
case "fdn":
ICCRecordHelper.getFreeRecordId(ICC_EF_FDN, onsuccess, onerror);
ICCRecordHelper.findFreeRecordId(ICC_EF_FDN, onsuccess, onerror);
break;
default:
if (onerror) {

View File

@ -1955,9 +1955,9 @@ add_test(function test_update_adn_like() {
});
/**
* Verify ICCRecordHelper.getFreeRecordId.
* Verify ICCRecordHelper.findFreeRecordId.
*/
add_test(function test_get_free_record_id() {
add_test(function test_find_free_record_id() {
let worker = newUint8Worker();
let helper = worker.GsmPDUHelper;
let record = worker.ICCRecordHelper;
@ -1998,7 +1998,7 @@ add_test(function test_get_free_record_id() {
};
let fileId = 0x0000; // Dummy.
record.getFreeRecordId(
record.findFreeRecordId(
fileId,
function (recordId) {
do_check_eq(recordId, 2);