mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Prevent accidental dialog close
This commit is contained in:
parent
f071bd54f6
commit
736739d694
@ -460,11 +460,12 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||
private void checkVpnLockdownNotice() {
|
||||
if(!Prefs.lockdownVpnNoticeShown(mPrefs) && Prefs.isFirewallEnabled(this, mPrefs) && !CaptureService.isLockdownVPN()) {
|
||||
new AlertDialog.Builder(this)
|
||||
AlertDialog dialog = new AlertDialog.Builder(this)
|
||||
.setMessage(R.string.vpn_lockdown_notice)
|
||||
.setPositiveButton(R.string.yes, (dialog, whichButton) -> Utils.startActivity(this, new Intent("android.net.vpn.SETTINGS")))
|
||||
.setNegativeButton(R.string.no, (dialog, whichButton) -> {})
|
||||
.setPositiveButton(R.string.yes, (d, whichButton) -> Utils.startActivity(this, new Intent("android.net.vpn.SETTINGS")))
|
||||
.setNegativeButton(R.string.no, (d, whichButton) -> {})
|
||||
.show();
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
|
||||
Prefs.setLockdownVpnNoticeShown(mPrefs);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user