B2G/gaia/apps/system/js/operator_variant/operator_variant.js
// Load and query APN database, then trigger callback on results.
Load and query APN database, then trigger callback on results.
Load and query APN database then trigger callback on results .
function retrieveOperatorVariantSettings(callback) {
    var OPERATOR_VARIANT_FILE = 'shared/resources/apn.json';
    var xhr = new XMLHttpRequest();
    xhr.open('GET', OPERATOR_VARIANT_FILE, true);
    xhr.responseType = 'json';
    xhr.onreadystatechange = function() {
      if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status === 0)) {
        var apn = xhr.response;
        var mcc = iccSettings.mcc;
        var mnc = iccSettings.mnc;
        var compatibleAPN = apn[mcc] ? (apn[mcc][mnc] || []) : [];
        callback(compatibleAPN);
      }
    };
    xhr.send();
  }
function retrieveOperatorVariantSettings ( callback ) { var OPERATOR_VARIANT_FILE = 'shared/resources/apn.json' ; var xhr = new XMLHttpRequest ( ) ; xhr . open ( 'GET' , OPERATOR_VARIANT_FILE , true ) ; xhr . responseType = 'json' ; xhr . onreadystatechange = function ( ) { if ( xhr . readyState == 4 && ( xhr . status == 200 || xhr . status === 0 ) ) { var apn = xhr . response ; var mcc = iccSettings . mcc ; var mnc = iccSettings . mnc ; var compatibleAPN = apn [ mcc ] ? ( apn [ mcc ] [ mnc ] || [ ] ) : [ ] ; callback ( compatibleAPN ) ; } } ; xhr . send ( ) ; }
Load and query APN database, then trigger callback on results.
Load and query APN database then trigger callback on results .
// get a list of matching APNs