mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-12 03:39:34 +01:00
if Orbot is installed, then default to using Tor
If the user has not changed the "Use Tor" preference, then the default should be to use Tor if Orbot is installed. The user can still override it by going an unchecking "Use Tor".
This commit is contained in:
parent
e63d43151b
commit
6bd2468d44
@ -27,6 +27,7 @@ import android.widget.MediaController;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.VideoView;
|
||||
import info.guardianproject.netcipher.NetCipher;
|
||||
import info.guardianproject.netcipher.proxy.OrbotHelper;
|
||||
|
||||
/**
|
||||
* Copyright (C) Christian Schabesberger 2015 <chris.schabesberger@mailbox.org>
|
||||
@ -362,7 +363,8 @@ public class PlayVideoActivity extends AppCompatActivity implements OnSharedPref
|
||||
}
|
||||
|
||||
private void setTorPreference(SharedPreferences prefs) {
|
||||
if(prefs.getBoolean(getString(R.string.useTor), false)) {
|
||||
// if Orbot is installed, then default to using Tor, the user can still override
|
||||
if(prefs.getBoolean(getString(R.string.useTor), OrbotHelper.isOrbotInstalled(this))) {
|
||||
NetCipher.useTor();
|
||||
} else {
|
||||
NetCipher.setProxy(null);
|
||||
|
Loading…
Reference in New Issue
Block a user