modifications around resource string layout and alert dialogs

svn:r22298
This commit is contained in:
Nathan Freitas 2010-05-08 04:19:06 +00:00
parent 127ed5d02f
commit b68f334d7a
2 changed files with 20 additions and 7 deletions

View File

@ -426,8 +426,22 @@ public class Orbot extends Activity implements OnClickListener, TorConstants, On
LayoutInflater li = LayoutInflater.from(this);
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)
.setTitle(getString(R.string.menu_info))
.setMessage(msg)
.setView(view)
.setNeutralButton(getString(R.string.button_about), new DialogInterface.OnClickListener() {
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)
{
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

View File

@ -15,8 +15,6 @@ public class 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_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_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++)
{
if (apps[i].getUsername().startsWith("org.torproject.android")) //we never want to Tor this!
continue;
if (apps[i].isTorified())
{
Log.i(TAG,"enabling transproxy for app: " + apps[i].getUsername() + "(" + apps[i].getUid() + ")");