mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 05:44:14 +00:00
Disable VPN handover on Android 11
This commit is contained in:
parent
8669d8d2cc
commit
053c11dc1d
2 changed files with 8 additions and 0 deletions
|
@ -175,6 +175,12 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
pref_wifi_homes.setEntryValues(listSSID.toArray(new CharSequence[0]));
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
TwoStatePreference pref_handover =
|
||||
(TwoStatePreference) screen.findPreference("handover");
|
||||
cat_advanced.removePreference(pref_handover);
|
||||
}
|
||||
|
||||
Preference pref_reset_usage = screen.findPreference("reset_usage");
|
||||
pref_reset_usage.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -569,6 +569,8 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
last_builder = builder;
|
||||
|
||||
boolean handover = prefs.getBoolean("handover", false);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
|
||||
handover = false;
|
||||
Log.i(TAG, "VPN restart handover=" + handover);
|
||||
|
||||
if (handover) {
|
||||
|
|
Loading…
Reference in a new issue