SharedLibraryLoader: prioritize ABI ordering
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
749efcde21
commit
6d01296e8b
@ -41,6 +41,7 @@ public final class SharedLibraryLoader {
|
|||||||
if (context.getApplicationInfo().splitSourceDirs != null)
|
if (context.getApplicationInfo().splitSourceDirs != null)
|
||||||
apks.addAll(Arrays.asList(context.getApplicationInfo().splitSourceDirs));
|
apks.addAll(Arrays.asList(context.getApplicationInfo().splitSourceDirs));
|
||||||
|
|
||||||
|
for (final String abi : Build.SUPPORTED_ABIS) {
|
||||||
for (final String apk : apks) {
|
for (final String apk : apks) {
|
||||||
final ZipFile zipFile;
|
final ZipFile zipFile;
|
||||||
try {
|
try {
|
||||||
@ -51,7 +52,6 @@ public final class SharedLibraryLoader {
|
|||||||
|
|
||||||
final String mappedLibName = System.mapLibraryName(libName);
|
final String mappedLibName = System.mapLibraryName(libName);
|
||||||
final byte[] buffer = new byte[1024 * 32];
|
final byte[] buffer = new byte[1024 * 32];
|
||||||
for (final String abi : Build.SUPPORTED_ABIS) {
|
|
||||||
final String libZipPath = "lib" + File.separatorChar + abi + File.separatorChar + mappedLibName;
|
final String libZipPath = "lib" + File.separatorChar + abi + File.separatorChar + mappedLibName;
|
||||||
final ZipEntry zipEntry = zipFile.getEntry(libZipPath);
|
final ZipEntry zipEntry = zipFile.getEntry(libZipPath);
|
||||||
if (zipEntry == null)
|
if (zipEntry == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user