forked from firka/firka
android: support uncompressed libs
This commit is contained in:
@@ -25,6 +25,8 @@ class AppMain : Application() {
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
var useUncompressedLibs = false
|
||||
|
||||
val abi = Build.SUPPORTED_ABIS[0]
|
||||
|
||||
val apks = File(applicationInfo.nativeLibraryDir, "../..").absoluteFile
|
||||
@@ -42,15 +44,24 @@ class AppMain : Application() {
|
||||
while (entries.hasMoreElements()) {
|
||||
val entry = entries.nextElement()
|
||||
|
||||
entry.name.endsWith("$abi/index.so")
|
||||
zip.close()
|
||||
nativesApkN = ZipFile(apk)
|
||||
break
|
||||
if (entry.name.endsWith("$abi/index.so")) {
|
||||
zip.close()
|
||||
nativesApkN = ZipFile(apk)
|
||||
break
|
||||
}
|
||||
if (entry.name.endsWith("$abi/libflutter.so")) {
|
||||
useUncompressedLibs = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
zip.close()
|
||||
}
|
||||
|
||||
if (useUncompressedLibs) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (nativesApkN == null) {
|
||||
throw Exception("Can't find native libraries")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user