apps/settings/js/carrier.js
// restart data connection by toggling it off and on again
restart data connection by toggling it off and on again
restart data connection by toggling it off and on again
function restartDataConnection() {
    var settings = Settings.mozSettings;
    if (!settings)
      return;
    restartingDataConnection = true;
    var key = 'ril.data.enabled';
    function setDataState(state) {
      var cset = {};
      cset[key] = state;
      settings.createLock().set(cset);
    }
    var request = settings.createLock().get(key);
    request.onsuccess = function() {
      if (request.result[key]) {
        setDataState(false);    
        setTimeout(function() { 
          restartingDataConnection = false;
          setDataState(true);
        }, 2500); 
      }
    };
  }
function restartDataConnection ( ) { var settings = Settings . mozSettings ; if ( ! settings ) return ; restartingDataConnection = true ; var key = 'ril.data.enabled' ; function setDataState ( state ) { var cset = { } ; cset [ key ] = state ; settings . createLock ( ) . set ( cset ) ; } var request = settings . createLock ( ) . get ( key ) ; request . onsuccess = function ( ) { if ( request . result [ key ] ) { setDataState ( false ) ; setTimeout ( function ( ) { restartingDataConnection = false ; setDataState ( true ) ; } , 2500 ) ; } } ; }
restart data connection by toggling it off and on again
restart data connection by toggling it off and on again
// turn data off // turn data back on // restart data connection in 2.5s