mirror of
https://github.com/M66B/NetGuard.git
synced 2025-03-15 08:29:02 +00:00
Handle security exception when starting VPN
This commit is contained in:
parent
0522715e21
commit
6ea9b2a934
1 changed files with 3 additions and 1 deletions
|
@ -932,9 +932,11 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private ParcelFileDescriptor startVPN(Builder builder) {
|
||||
private ParcelFileDescriptor startVPN(Builder builder) throws SecurityException {
|
||||
try {
|
||||
return builder.establish();
|
||||
} catch (SecurityException ex) {
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue