simple notification of bridge settings via URL

This commit is contained in:
Nathan Freitas 2014-05-08 09:54:48 -04:00
parent 17934e6b33
commit 278997de38
1 changed files with 3 additions and 1 deletions

View File

@ -613,10 +613,12 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
{ {
if (urlString.toLowerCase().startsWith("bridge://")) if (urlString.toLowerCase().startsWith("bridge://"))
{ {
String newBridgeValue = urlString.substring(9); //remove the bridge protocol piece String newBridgeValue = urlString.substring(9); //remove the bridge protocol piece
newBridgeValue = URLDecoder.decode(newBridgeValue); //decode the value here newBridgeValue = URLDecoder.decode(newBridgeValue); //decode the value here
showAlert("Bridges Updated","Restart Orbot to use this bridge: " + newBridgeValue,false);
SharedPreferences mPrefs = TorServiceUtils.getSharedPrefs(getApplicationContext()); SharedPreferences mPrefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
Editor pEdit = mPrefs.edit(); Editor pEdit = mPrefs.edit();