Skip to content

Commit

Permalink
fix: npe when patching on android 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Ushie committed Sep 3, 2023
1 parent c5fc54e commit 9f64011
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f64011

Please sign in to comment.