modifications around resource string layout and alert dialogs
svn:r22298
This commit is contained in:
parent
127ed5d02f
commit
b68f334d7a
|
@ -426,8 +426,22 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On
|
||||||
LayoutInflater li = LayoutInflater.from(this);
|
LayoutInflater li = LayoutInflater.from(this);
|
||||||
View view = li.inflate(R.layout.layout_help, null);
|
View view = li.inflate(R.layout.layout_help, null);
|
||||||
|
|
||||||
|
StringBuilder msg = new StringBuilder();
|
||||||
|
msg.append(R.string.help_text_1);
|
||||||
|
msg.append("\n\n");
|
||||||
|
msg.append(R.string.help_text_2);
|
||||||
|
msg.append("\n\n");
|
||||||
|
msg.append(R.string.help_text_3);
|
||||||
|
msg.append("\n\n");
|
||||||
|
msg.append(R.string.help_text_4);
|
||||||
|
msg.append("\n\n");
|
||||||
|
msg.append(R.string.help_text_5);
|
||||||
|
msg.append("\n\n");
|
||||||
|
|
||||||
|
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
.setTitle(getString(R.string.menu_info))
|
.setTitle(getString(R.string.menu_info))
|
||||||
|
.setMessage(msg)
|
||||||
.setView(view)
|
.setView(view)
|
||||||
.setNeutralButton(getString(R.string.button_about), new DialogInterface.OnClickListener() {
|
.setNeutralButton(getString(R.string.button_about), new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int whichButton) {
|
public void onClick(DialogInterface dialog, int whichButton) {
|
||||||
|
@ -611,8 +625,12 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On
|
||||||
|
|
||||||
private void showAlert(String msg)
|
private void showAlert(String msg)
|
||||||
{
|
{
|
||||||
Toast.makeText(this,msg,
|
|
||||||
Toast.LENGTH_LONG).show();
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
|
builder.setMessage(msg);
|
||||||
|
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Set the state of the running/not running graphic and label
|
* Set the state of the running/not running graphic and label
|
||||||
|
|
|
@ -15,8 +15,6 @@ public class TorTransProxy {
|
||||||
private final static String TAG = "TorTransProxy";
|
private final static String TAG = "TorTransProxy";
|
||||||
|
|
||||||
private final static String CMD_NAT_FLUSH = "iptables -t nat -F || exit\n";
|
private final static String CMD_NAT_FLUSH = "iptables -t nat -F || exit\n";
|
||||||
// private final static String CMD_NAT_IPTABLES_ALL = "iptables -t nat -A OUTPUT -j DNAT --to 127.0.0.1:9040 || exit\n";
|
|
||||||
|
|
||||||
private final static String CMD_DNS_PROXYING_ADD = "iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 127.0.0.1:5400 || exit\n";
|
private final static String CMD_DNS_PROXYING_ADD = "iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 127.0.0.1:5400 || exit\n";
|
||||||
private final static String CMD_DNS_PROXYING_DELETE = "iptables -t nat -D PREROUTING -p udp --dport 53 -j DNAT --to 127.0.0.1:5400 || exit\n";
|
private final static String CMD_DNS_PROXYING_DELETE = "iptables -t nat -D PREROUTING -p udp --dport 53 -j DNAT --to 127.0.0.1:5400 || exit\n";
|
||||||
|
|
||||||
|
@ -90,9 +88,6 @@ public class TorTransProxy {
|
||||||
for (int i = 0; i < apps.length; i++)
|
for (int i = 0; i < apps.length; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (apps[i].getUsername().startsWith("org.torproject.android")) //we never want to Tor this!
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (apps[i].isTorified())
|
if (apps[i].isTorified())
|
||||||
{
|
{
|
||||||
Log.i(TAG,"enabling transproxy for app: " + apps[i].getUsername() + "(" + apps[i].getUid() + ")");
|
Log.i(TAG,"enabling transproxy for app: " + apps[i].getUsername() + "(" + apps[i].getUid() + ")");
|
||||||
|
|
Loading…
Reference in New Issue