[tor-commits] [orbot/master] re-added startService() call as some devices/OS need it

n8fr8 at torproject.org n8fr8 at torproject.org
Fri Jun 29 20:14:38 UTC 2012


commit 318beaabcd92f2e180428e45d9476be00c1aa4fb
Author: n8fr8 <nathan at freitas.net>
Date:   Fri Jun 29 12:04:26 2012 -0400

    re-added startService() call as some devices/OS need it
---
 src/org/torproject/android/Orbot.java |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java
index e10f9af..1a09ac7 100644
--- a/src/org/torproject/android/Orbot.java
+++ b/src/org/torproject/android/Orbot.java
@@ -91,6 +91,9 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener
                 
             imgStatus = (ImageView)findViewById(R.id.imgStatus);
             imgStatus.setOnLongClickListener(this);
+            
+    		startService(new Intent(INTENT_TOR_SERVICE));
+
 
     }
     
@@ -307,12 +310,9 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener
 	protected void onResume() {
 		super.onResume();
 		
-		setLocale();
-		
-    	bindService();
-        // 	startService(new Intent(INTENT_TOR_SERVICE));
-
+//		setLocale();
 
+    	bindService();
 		
 		if (getIntent() == null)
 			return;
@@ -393,19 +393,17 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener
 			}
 			
 		}
-	}
-
-	/* (non-Javadoc)
-	 * @see android.app.Activity#onStart()
-	 */
-	protected void onStart() {
-		super.onStart();
-		
 		
 		updateStatus ("");
 		
 	}
 
+	@Override
+	public void onConfigurationChanged(Configuration newConfig) {
+		// TODO Auto-generated method stub
+		super.onConfigurationChanged(newConfig);
+	}
+
 	/* (non-Javadoc)
 	 * @see android.app.Activity#onStop()
 	 */
@@ -462,7 +460,8 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener
             //then update the preferences in an async background task
             if (requestCode == 1 && resultCode == 1010 && mService != null)
             {
-                    new ProcessSettingsAsyncTask().execute(mService);        
+                    new ProcessSettingsAsyncTask().execute(mService);      
+                    setLocale();
             }
     }
     





More information about the tor-commits mailing list