mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-21 13:56:58 +00:00
Fixed switch position after denying VPN connection
This commit is contained in:
parent
c0872c2522
commit
89db2ed4f8
1 changed files with 2 additions and 0 deletions
|
@ -128,6 +128,8 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
|||
swEnabled.setChecked(enabled);
|
||||
swEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
prefs.edit().putBoolean("enabled", isChecked).apply();
|
||||
|
||||
if (isChecked) {
|
||||
Log.i(TAG, "Switch on");
|
||||
final Intent prepare = VpnService.prepare(ActivityMain.this);
|
||||
|
|
Loading…
Reference in a new issue