enable background starts by default only for Service intent calls

This commit is contained in:
Nathan Freitas 2015-06-22 12:57:59 -04:00
parent dc16c98ff7
commit 765bc61ded
2 changed files with 5 additions and 2 deletions

View File

@ -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"/>

View File

@ -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))