"Allow Background Starts" prefs also controls the old START_TOR Intent

This commit is contained in:
Hans-Christoph Steiner 2015-06-17 11:45:07 -04:00
parent adf7c09f0e
commit 943edf094b
1 changed files with 4 additions and 4 deletions

View File

@ -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();
}