add warning about restarting Orbot after settings changes

This commit is contained in:
Nathan Freitas 2014-09-06 01:02:38 -04:00
parent 8ee5e9e0fb
commit 313c92f863
2 changed files with 11 additions and 2 deletions

View File

@ -293,5 +293,8 @@
<string name="pref_transproxy_flush_title">Transproxy FORCE REMOVE</string>
<string name="pref_transproxy_flush_summary">Tap here to flush all transproxy network rules NOW</string>
<string name="transparent_proxy_rules_flushed_">Transparent proxy rules flushed!</string>
<string name="you_do_not_have_root_access_enabled">You do not have ROOT access enabled</string>
<string name="you_may_need_to_stop_and_start_orbot_for_settings_change_to_be_enabled_">You may need to stop and start Orbot for settings change to be enabled.</string>
</resources>

View File

@ -790,6 +790,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
protected void onActivityResult(int request, int response, Intent data) {
super.onActivityResult(request, response, data);
if (request == 1 && response == RESULT_OK)
{
if (data != null && data.getBooleanExtra("transproxywipe", false))
@ -801,19 +802,24 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
if (result)
{
Toast.makeText(this, "Transparent proxy rules flushed!", Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.transparent_proxy_rules_flushed_, Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(this, "You do not have ROOT access enabled", Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.you_do_not_have_root_access_enabled, Toast.LENGTH_SHORT).show();
}
} catch (RemoteException e) {
e.printStackTrace();
}
}
else
{
Toast.makeText(this, R.string.you_may_need_to_stop_and_start_orbot_for_settings_change_to_be_enabled_, Toast.LENGTH_SHORT).show();
}
}
}