Bug 835802 - Part 2: Rename getFreeRecordId to findFreeRecordId. r=vicamo
authorYoshi Huang <allstars.chh@mozilla.com>
Tue, 09 Apr 2013 11:57:57 +0800
changeset 141717 502bedabba41084554518cf1b787d1deccb40e88
parent 141716 e465ed12846dd6cf257ddefc888abbb0dfb3273e
child 141718 b3c4b6d69d60a3cc0369fd5cf18f25da0002cbdf
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs835802
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 835802 - Part 2: Rename getFreeRecordId to findFreeRecordId. r=vicamo
dom/system/gonk/ril_worker.js
dom/system/gonk/tests/test_ril_worker_icc.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -10829,23 +10829,23 @@ let ICCRecordHelper = {
     }
 
     let pnn = [];
     ICCIOHelper.loadLinearFixedEF({fileId: ICC_EF_PNN,
                                    callback: callback.bind(this)});
   },
 
   /**
-   * 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;
       let readLen = 0;
 
       while (readLen < octetLen) {
         let octet = GsmPDUHelper.readHexOctet();
         readLen++;
@@ -11347,31 +11347,31 @@ let ICCContactHelper = {
    * @param onsuccess     Callback to be called when success.
    * @param onerror       Callback to be called when error.
    */
   findFreeICCContact: function findFreeICCContact(appType, contactType, onsuccess, onerror) {
     switch (contactType) {
       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);
 
             ICCRecordHelper.readPBR(gotPbrCb, onerror);
             break;
         }
         break;
       case "fdn":
-        ICCRecordHelper.getFreeRecordId(ICC_EF_FDN, onsuccess, onerror);
+        ICCRecordHelper.findFreeRecordId(ICC_EF_FDN, onsuccess, onerror);
         break;
       default:
         if (onerror) {
           onerror(GECKO_ERROR_REQUEST_NOT_SUPPORTED);
         }
         break;
     }
   },
--- a/dom/system/gonk/tests/test_ril_worker_icc.js
+++ b/dom/system/gonk/tests/test_ril_worker_icc.js
@@ -1950,19 +1950,19 @@ add_test(function test_update_adn_like()
 
   fileId = ICC_EF_FDN;
   record.updateADNLike(fileId,
                        {recordId: 1, alphaId: "test", number: "123456"},
                        "1111");
 });
 
 /**
- * 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;
   let buf    = worker.Buf;
   let io     = worker.ICCIOHelper;
 
   function writeRecord (record) {
     // Write data size
@@ -1993,17 +1993,17 @@ add_test(function test_get_free_record_i
     options.p1++;
     writeRecord(record);
     if (options.callback) {
       options.callback(options);
     }
   };
 
   let fileId = 0x0000; // Dummy.
-  record.getFreeRecordId(
+  record.findFreeRecordId(
     fileId,
     function (recordId) {
       do_check_eq(recordId, 2);
       run_next_test();
     }.bind(this),
     function (errorMsg) {
       do_print(errorMsg);
       do_check_true(false);