[tor-commits] [orbot/master] "Allow Background Starts" prefs also controls the old START_TOR Intent

n8fr8 at torproject.org n8fr8 at torproject.org
Thu Jun 25 14:59:59 UTC 2015


commit 943edf094bfd559abc0d7359ce7728f3e322cd15
Author: Hans-Christoph Steiner <hans at eds.org>
Date:   Wed Jun 17 11:45:07 2015 -0400

    "Allow Background Starts" prefs also controls the old START_TOR Intent
---
 src/org/torproject/android/OrbotMainActivity.java |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/org/torproject/android/OrbotMainActivity.java b/src/org/torproject/android/OrbotMainActivity.java
index 15af8b9..0bc0f7e 100644
--- a/src/org/torproject/android/OrbotMainActivity.java
+++ b/src/org/torproject/android/OrbotMainActivity.java
@@ -554,9 +554,10 @@ public class OrbotMainActivity extends Activity
 			    .setNegativeButton("Deny", dialogClickListener).show();
 			
 			return; //don't null the setIntent() as we need it later
-		}
-		else if (action.equals("org.torproject.android.START_TOR"))
-		{
+        }
+        else if (action.equals("org.torproject.android.START_TOR")
+                && Prefs.allowBackgroundStarts())
+        {
 			autoStartFromIntent = true;
             try {
                 startTor();
@@ -569,7 +570,6 @@ public class OrbotMainActivity extends Activity
                 }
                 resultIntent.putExtra(TorServiceConstants.EXTRA_STATUS, torStatus);
                 setResult(RESULT_OK, resultIntent);
-                finish();
             } catch (RemoteException e) {
                 e.printStackTrace();
             }





More information about the tor-commits mailing list