mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Catch possible SecurityException starting the VPN
This commit is contained in:
parent
95686b1def
commit
90c8ae537a
@ -538,7 +538,8 @@ public class CaptureService extends VpnService implements Runnable {
|
||||
|
||||
try {
|
||||
mParcelFileDescriptor = builder.setSession(CaptureService.VpnSessionName).establish();
|
||||
} catch (IllegalArgumentException | IllegalStateException e) {
|
||||
} catch (IllegalArgumentException | IllegalStateException | SecurityException e) {
|
||||
e.printStackTrace();
|
||||
Utils.showToast(this, R.string.vpn_setup_failed);
|
||||
return abortStart();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user