|
|
@ -614,11 +614,11 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll |
|
|
|
int port; |
|
|
|
int port; |
|
|
|
|
|
|
|
|
|
|
|
switch (mPreferences.getProxyChoice()) { |
|
|
|
switch (mPreferences.getProxyChoice()) { |
|
|
|
case 0: |
|
|
|
case Constants.NO_PROXY: |
|
|
|
// We shouldn't be here
|
|
|
|
// We shouldn't be here
|
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
case 1: |
|
|
|
case Constants.PROXY_ORBOT: |
|
|
|
OrbotHelper oh = new OrbotHelper(this); |
|
|
|
OrbotHelper oh = new OrbotHelper(this); |
|
|
|
if (!oh.isOrbotRunning()) { |
|
|
|
if (!oh.isOrbotRunning()) { |
|
|
|
oh.requestOrbotStart(this); |
|
|
|
oh.requestOrbotStart(this); |
|
|
@ -627,7 +627,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll |
|
|
|
port = 8118; |
|
|
|
port = 8118; |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 2: |
|
|
|
case Constants.PROXY_I2P: |
|
|
|
mI2PProxyInitialized = true; |
|
|
|
mI2PProxyInitialized = true; |
|
|
|
if (mI2PHelperBound && !mI2PHelper.isI2PAndroidRunning()) { |
|
|
|
if (mI2PHelperBound && !mI2PHelper.isI2PAndroidRunning()) { |
|
|
|
mI2PHelper.requestI2PAndroidStart(this); |
|
|
|
mI2PHelper.requestI2PAndroidStart(this); |
|
|
@ -651,7 +651,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isProxyReady() { |
|
|
|
public boolean isProxyReady() { |
|
|
|
if (mPreferences.getProxyChoice() == 2) { |
|
|
|
if (mPreferences.getProxyChoice() == Constants.PROXY_I2P) { |
|
|
|
if (!mI2PHelper.isI2PAndroidRunning()) { |
|
|
|
if (!mI2PHelper.isI2PAndroidRunning()) { |
|
|
|
Utils.showToast(this, getString(R.string.i2p_not_running)); |
|
|
|
Utils.showToast(this, getString(R.string.i2p_not_running)); |
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -1501,7 +1501,7 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void onStart() { |
|
|
|
protected void onStart() { |
|
|
|
super.onStart(); |
|
|
|
super.onStart(); |
|
|
|
if (mPreferences.getProxyChoice() == 2) { |
|
|
|
if (mPreferences.getProxyChoice() == Constants.PROXY_I2P) { |
|
|
|
// Try to bind to I2P Android
|
|
|
|
// Try to bind to I2P Android
|
|
|
|
mI2PHelper.bind(new I2PAndroidHelper.Callback() { |
|
|
|
mI2PHelper.bind(new I2PAndroidHelper.Callback() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|