B2G/gecko/dom/system/gonk/NetworkManager.js
// Switch usb function by modifying property of persist.sys.usb.config.
Switch usb function by modifying property of persist.sys.usb.config.
Switch usb function by modifying property of persist . sys . usb . config .
function enableUsbRndis(enable, callback) {
    debug("enableUsbRndis: " + enable);
    let params = {
      cmd: "enableUsbRndis",
      enable: enable
    };
    if (callback) {
      params.report = true;
    } else {
      params.report = false;
    }
    params.isAsync = true;
    this._usbTetheringAction = TETHERING_STATE_ONGOING;
    this.controlMessage(params, callback);
  }
function enableUsbRndis ( enable , callback ) { debug ( "enableUsbRndis: " + enable ) ; let params = { cmd : "enableUsbRndis" , enable : enable } ; if ( callback ) { params . report = true ; } else { params . report = false ; } params . isAsync = true ; this . _usbTetheringAction = TETHERING_STATE_ONGOING ; this . controlMessage ( params , callback ) ; }
Switch usb function by modifying property of persist.sys.usb.config.
Switch usb function by modifying property of persist . sys . usb . config .
// Ask net work to report the result when this value is set to true. // The callback function in controlMessage may not be fired immediately.