mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: npe when patching on android 8
This commit is contained in:
parent
c5fc54e721
commit
9f64011b26
@ -24,7 +24,6 @@ import java.io.StringWriter
|
|||||||
import java.util.logging.LogRecord
|
import java.util.logging.LogRecord
|
||||||
import java.util.logging.Logger
|
import java.util.logging.Logger
|
||||||
|
|
||||||
|
|
||||||
class MainActivity : FlutterActivity() {
|
class MainActivity : FlutterActivity() {
|
||||||
private val handler = Handler(Looper.getMainLooper())
|
private val handler = Handler(Looper.getMainLooper())
|
||||||
private lateinit var installerChannel: MethodChannel
|
private lateinit var installerChannel: MethodChannel
|
||||||
@ -182,7 +181,8 @@ class MainActivity : FlutterActivity() {
|
|||||||
updateProgress(0.1, "Loading patches...", "Loading patches")
|
updateProgress(0.1, "Loading patches...", "Loading patches")
|
||||||
|
|
||||||
val patches = PatchBundleLoader.Dex(
|
val patches = PatchBundleLoader.Dex(
|
||||||
File(patchBundleFilePath)
|
File(patchBundleFilePath),
|
||||||
|
optimizedDexDirectory = cacheDir
|
||||||
).filter { patch ->
|
).filter { patch ->
|
||||||
val isCompatible = patch.compatiblePackages?.any {
|
val isCompatible = patch.compatiblePackages?.any {
|
||||||
it.name == patcher.context.packageMetadata.packageName
|
it.name == patcher.context.packageMetadata.packageName
|
||||||
|
Loading…
Reference in New Issue
Block a user