diff --git a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java index 7b23d91..8190213 100644 --- a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java @@ -588,11 +588,12 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll public void onClick(DialogInterface dialog, int which) { switch (which) { case DialogInterface.BUTTON_POSITIVE: - mPreferences.setProxyChoice(orbotInstalled ? 1 : 2); + mPreferences.setProxyChoice(orbotInstalled ? + Constants.PROXY_ORBOT : Constants.PROXY_I2P); initializeProxy(); break; case DialogInterface.BUTTON_NEGATIVE: - mPreferences.setProxyChoice(0); + mPreferences.setProxyChoice(Constants.NO_PROXY); break; } } diff --git a/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java b/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java index 78375ce..224959f 100644 --- a/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java +++ b/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java @@ -233,7 +233,7 @@ public class PreferenceManager { } public int getProxyChoice() { - return mPrefs.getInt(Name.PROXY_CHOICE, 0); + return mPrefs.getInt(Name.PROXY_CHOICE, Constants.NO_PROXY); } public int getUserAgentChoice() { @@ -409,12 +409,17 @@ public class PreferenceManager { } /** - * 0: None. 1: Orbot. 2: I2P. + * Valid choices: + *