diff options
author | cyberta <cyberta@riseup.net> | 2020-12-29 19:24:27 -0800 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2020-12-29 19:24:27 -0800 |
commit | f03c21446566546e66c977c72c16fdb87f16ffed (patch) | |
tree | 4e3d7c5561e963504553ee941cc258b6b2b06d14 /app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java | |
parent | fd81f2e14e36adb59d534df257e6ba2262cc362f (diff) | |
parent | 9b690df036cf91f749c0b6159a7035233a73315d (diff) |
Merge branch 'update_android_10' into 'master'
Update android 10
See merge request leap/bitmask_android!118
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java b/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java index 810974df..7c742746 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java +++ b/app/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java @@ -27,6 +27,10 @@ public class VPNLaunchHelper { private static String writeMiniVPN(Context context) { + String nativeAPI = NativeUtils.getNativeAPI(); + /* Q does not allow executing binaries written in temp directory anymore */ + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) + return new File(context.getApplicationInfo().nativeLibraryDir, "libovpnexec.so").getPath(); String[] abis; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) abis = getSupportedABIsLollipop(); @@ -34,7 +38,6 @@ public class VPNLaunchHelper { //noinspection deprecation abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2}; - String nativeAPI = NativeUtils.getNativeAPI(); if (!nativeAPI.equals(abis[0])) { VpnStatus.logWarning(R.string.abi_mismatch, Arrays.toString(abis), nativeAPI); abis = new String[]{nativeAPI}; |