Code example for Context

Methods: getContentResolver

0
        } 
        return (wifiSavedState == 1);
    } 
 
    private int getPersistedWifiState() { 
        final ContentResolver cr = mContext.getContentResolver();
        try { 
            return Settings.Global.getInt(cr, Settings.Global.WIFI_ON);
        } catch (Settings.SettingNotFoundException e) {
            Settings.Global.putInt(cr, Settings.Global.WIFI_ON, WIFI_DISABLED);
            return WIFI_DISABLED;
        } 
    } 
 
    private boolean getPersistedAirplaneModeOn() { 
        return Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.AIRPLANE_MODE_ON, 0) == 1;
    } 
 
    private boolean getPersistedScanAlwaysAvailable() { 
        return Settings.Global.getInt(mContext.getContentResolver(),