From 9f64011b260ef6aba7a0f304317eca12d05fcdd9 Mon Sep 17 00:00:00 2001 From: Ushie Date: Sun, 3 Sep 2023 20:54:42 +0300 Subject: [PATCH] fix: npe when patching on android 8 --- .../main/kotlin/app/revanced/manager/flutter/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt index 2c11653df5..4bdb6cf0dc 100644 --- a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt +++ b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt @@ -24,7 +24,6 @@ import java.io.StringWriter import java.util.logging.LogRecord import java.util.logging.Logger - class MainActivity : FlutterActivity() { private val handler = Handler(Looper.getMainLooper()) private lateinit var installerChannel: MethodChannel @@ -182,7 +181,8 @@ class MainActivity : FlutterActivity() { updateProgress(0.1, "Loading patches...", "Loading patches") val patches = PatchBundleLoader.Dex( - File(patchBundleFilePath) + File(patchBundleFilePath), + optimizedDexDirectory = cacheDir ).filter { patch -> val isCompatible = patch.compatiblePackages?.any { it.name == patcher.context.packageMetadata.packageName