Code example for Field

Methods: getInt

0
    protected WifiManager.WifiLock createWiFiLock() {
        int wifiMode = WifiManager.WIFI_MODE_FULL;
        try { 
            // TODO: What's this? 
            Field f = WifiManager.class.getField("WIFI_MODE_FULL_HIGH_PERF");
            wifiMode = f.getInt(null);
        } catch (Exception e) {
            // Ignore 
        } 
        WifiManager.WifiLock wifiLock =
            wifiManager.createWifiLock(wifiMode, getClass().getSimpleName());
        log.info("Created WiFi lock, mode: " + wifiMode);
        return wifiLock;
    } 
 
    /** 
     * Can be overriden by subclasses to do additional work. 
     * 
     * @param oldNetwork <code>null</code> when first called by constructor. 
     */ 
    protected void onNetworkTypeChange(NetworkInfo oldNetwork, NetworkInfo newNetwork) throws RouterException {