[tor-commits] [orbot/master] enable background starts by default only for Service intent calls

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


commit 765bc61deded5fdd662a5d0c2f19a8c57e32203a
Author: Nathan Freitas <nathan at freitas.net>
Date:   Mon Jun 22 12:57:59 2015 -0400

    enable background starts by default only for Service intent calls
---
 res/xml/preferences.xml                           |    2 +-
 src/org/torproject/android/OrbotMainActivity.java |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
index 08eddfa..e1e1828 100644
--- a/res/xml/preferences.xml
+++ b/res/xml/preferences.xml
@@ -23,7 +23,7 @@ android:enabled="true"
 android:title="@string/pref_use_expanded_notifications_title"/>
 
 <CheckBoxPreference
-android:defaultValue="false" 
+android:defaultValue="true" 
 android:key="pref_allow_background_starts"
 android:summary="@string/pref_allow_background_starts_summary"
 android:title="@string/pref_allow_background_starts_title"/>
diff --git a/src/org/torproject/android/OrbotMainActivity.java b/src/org/torproject/android/OrbotMainActivity.java
index cf4600b..d4ed148 100644
--- a/src/org/torproject/android/OrbotMainActivity.java
+++ b/src/org/torproject/android/OrbotMainActivity.java
@@ -570,6 +570,9 @@ public class OrbotMainActivity extends Activity
           
             startTor();
 
+            //never allow backgrounds start from this type of intent start
+            //app devs who want background starts, can use the service intents
+            /**
             if (Prefs.allowBackgroundStarts())
             {            
 	            Intent resultIntent;
@@ -581,7 +584,7 @@ public class OrbotMainActivity extends Activity
 	            resultIntent.putExtra(TorServiceConstants.EXTRA_STATUS, torStatus);
 	            setResult(RESULT_OK, resultIntent);
 	            finish();
-            }
+            }*/
           
 		}
 		else if (action.equals(Intent.ACTION_VIEW))





More information about the tor-commits mailing list