mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-11 13:46:17 +00:00
fix: npe when loading patch bundle on android 8
This commit is contained in:
@@ -94,9 +94,12 @@ class MainActivity : FlutterActivity() {
|
||||
|
||||
"getPatches" -> {
|
||||
val patchBundleFilePath = call.argument<String>("patchBundleFilePath")
|
||||
val cacheDirPath = call.argument<String>("cacheDirPath")
|
||||
|
||||
if (patchBundleFilePath != null) {
|
||||
val patches = PatchBundleLoader.Dex(
|
||||
File(patchBundleFilePath)
|
||||
File(patchBundleFilePath),
|
||||
optimizedDexDirectory = File(cacheDirPath)
|
||||
).map { patch ->
|
||||
val map = HashMap<String, Any>()
|
||||
map["\"name\""] = "\"${patch.patchName.replace("\"","\\\"")}\""
|
||||
|
||||
Reference in New Issue
Block a user