[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r22298: {projects} modifications around resource string layout and alert dialog (in projects/android/trunk/Orbot/src/org/torproject/android: . service)



Author: n8fr8
Date: 2010-05-08 04:19:06 +0000 (Sat, 08 May 2010)
New Revision: 22298

Modified:
   projects/android/trunk/Orbot/src/org/torproject/android/Orbot.java
   projects/android/trunk/Orbot/src/org/torproject/android/service/TorTransProxy.java
Log:
modifications around resource string layout and alert dialogs

Modified: projects/android/trunk/Orbot/src/org/torproject/android/Orbot.java
===================================================================
--- projects/android/trunk/Orbot/src/org/torproject/android/Orbot.java	2010-05-08 04:18:24 UTC (rev 22297)
+++ projects/android/trunk/Orbot/src/org/torproject/android/Orbot.java	2010-05-08 04:19:06 UTC (rev 22298)
@@ -426,8 +426,22 @@
 		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 @@
 	
 	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

Modified: projects/android/trunk/Orbot/src/org/torproject/android/service/TorTransProxy.java
===================================================================
--- projects/android/trunk/Orbot/src/org/torproject/android/service/TorTransProxy.java	2010-05-08 04:18:24 UTC (rev 22297)
+++ projects/android/trunk/Orbot/src/org/torproject/android/service/TorTransProxy.java	2010-05-08 04:19:06 UTC (rev 22298)
@@ -15,8 +15,6 @@
 	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 @@
 			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() + ")");