summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-13 10:28:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-13 11:46:41 +0200
commitbdc8e02a9016426c83e46415c26ba66520370ba9 (patch)
treee76a45e4ac19a4815aa53d712fcfc34da4772596 /app/src/main/java
parent26be9b7c9f45177696d66735e8e43b3a6224349a (diff)
SharedLibraryLoader: prioritize ABI ordering
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java b/app/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java
index f3816939..50026614 100644
--- a/app/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java
+++ b/app/src/main/java/com/wireguard/android/util/SharedLibraryLoader.java
@@ -41,17 +41,17 @@ public final class SharedLibraryLoader {
if (context.getApplicationInfo().splitSourceDirs != null)
apks.addAll(Arrays.asList(context.getApplicationInfo().splitSourceDirs));
- for (final String apk : apks) {
- final ZipFile zipFile;
- try {
- zipFile = new ZipFile(new File(apk), ZipFile.OPEN_READ);
- } catch (final IOException e) {
- throw new RuntimeException(e);
- }
+ for (final String abi : Build.SUPPORTED_ABIS) {
+ for (final String apk : apks) {
+ final ZipFile zipFile;
+ try {
+ zipFile = new ZipFile(new File(apk), ZipFile.OPEN_READ);
+ } catch (final IOException e) {
+ throw new RuntimeException(e);
+ }
- final String mappedLibName = System.mapLibraryName(libName);
- final byte[] buffer = new byte[1024 * 32];
- for (final String abi : Build.SUPPORTED_ABIS) {
+ final String mappedLibName = System.mapLibraryName(libName);
+ final byte[] buffer = new byte[1024 * 32];
final String libZipPath = "lib" + File.separatorChar + abi + File.separatorChar + mappedLibName;
final ZipEntry zipEntry = zipFile.getEntry(libZipPath);
if (zipEntry == null)