private static final String USER_AGENT = "user_agent";
private static final String CUSTOM_USER_AGENT = "custom_user_agent";
private static final String INCOGNITO_MODE = "incognito_mode";
private static final String USER_AGENT = "user_agent";
private static final String CUSTOM_USER_AGENT = "custom_user_agent";
private static final String INCOGNITO_MODE = "incognito_mode";
private static final String ALLOW_SCREENSHOTS = "allow_screenshots";
private static final String EASYLIST = "easylist";
private static final String EASYPRIVACY = "easyprivacy";
private static final String ALLOW_SCREENSHOTS = "allow_screenshots";
private static final String EASYLIST = "easylist";
private static final String EASYPRIVACY = "easyprivacy";
// Upgrade from schema version 12, Privacy Browser 3.6.
case 12:
// Do nothing. `download_location` and `download_custom_location` were removed from the preferences table.
// Upgrade from schema version 12, Privacy Browser 3.6.
case 12:
// Do nothing. `download_location` and `download_custom_location` were removed from the preferences table.
.putString(USER_AGENT, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(USER_AGENT)))
.putString(CUSTOM_USER_AGENT, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(CUSTOM_USER_AGENT)))
.putBoolean(INCOGNITO_MODE, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(INCOGNITO_MODE)) == 1)
.putString(USER_AGENT, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(USER_AGENT)))
.putString(CUSTOM_USER_AGENT, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndex(CUSTOM_USER_AGENT)))
.putBoolean(INCOGNITO_MODE, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(INCOGNITO_MODE)) == 1)
.putBoolean(ALLOW_SCREENSHOTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(ALLOW_SCREENSHOTS)) == 1)
.putBoolean(EASYLIST, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(EASYLIST)) == 1)
.putBoolean(EASYPRIVACY, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(EASYPRIVACY)) == 1)
.putBoolean(ALLOW_SCREENSHOTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(ALLOW_SCREENSHOTS)) == 1)
.putBoolean(EASYLIST, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(EASYLIST)) == 1)
.putBoolean(EASYPRIVACY, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndex(EASYPRIVACY)) == 1)
USER_AGENT + " TEXT, " +
CUSTOM_USER_AGENT + " TEXT, " +
INCOGNITO_MODE + " BOOLEAN, " +
USER_AGENT + " TEXT, " +
CUSTOM_USER_AGENT + " TEXT, " +
INCOGNITO_MODE + " BOOLEAN, " +
ALLOW_SCREENSHOTS + " BOOLEAN, " +
EASYLIST + " BOOLEAN, " +
EASYPRIVACY + " BOOLEAN, " +
ALLOW_SCREENSHOTS + " BOOLEAN, " +
EASYLIST + " BOOLEAN, " +
EASYPRIVACY + " BOOLEAN, " +
preferencesContentValues.put(USER_AGENT, sharedPreferences.getString(USER_AGENT, context.getString(R.string.user_agent_default_value)));
preferencesContentValues.put(CUSTOM_USER_AGENT, sharedPreferences.getString(CUSTOM_USER_AGENT, context.getString(R.string.custom_user_agent_default_value)));
preferencesContentValues.put(INCOGNITO_MODE, sharedPreferences.getBoolean(INCOGNITO_MODE, false));
preferencesContentValues.put(USER_AGENT, sharedPreferences.getString(USER_AGENT, context.getString(R.string.user_agent_default_value)));
preferencesContentValues.put(CUSTOM_USER_AGENT, sharedPreferences.getString(CUSTOM_USER_AGENT, context.getString(R.string.custom_user_agent_default_value)));
preferencesContentValues.put(INCOGNITO_MODE, sharedPreferences.getBoolean(INCOGNITO_MODE, false));
preferencesContentValues.put(ALLOW_SCREENSHOTS, sharedPreferences.getBoolean(ALLOW_SCREENSHOTS, false));
preferencesContentValues.put(EASYLIST, sharedPreferences.getBoolean(EASYLIST, true));
preferencesContentValues.put(EASYPRIVACY, sharedPreferences.getBoolean(EASYPRIVACY, true));
preferencesContentValues.put(ALLOW_SCREENSHOTS, sharedPreferences.getBoolean(ALLOW_SCREENSHOTS, false));
preferencesContentValues.put(EASYLIST, sharedPreferences.getBoolean(EASYLIST, true));
preferencesContentValues.put(EASYPRIVACY, sharedPreferences.getBoolean(EASYPRIVACY, true));