mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-04-30 05:14:26 +02:00
fix: allow setting DexClassLoader.optimizedDirectory
This is required for API level below 26, otherwise an NPE is thrown
This commit is contained in:
parent
1bb05f22d3
commit
11a3378659
@ -16,6 +16,7 @@ import java.util.jar.JarFile
|
||||
/**
|
||||
* A patch bundle.
|
||||
*
|
||||
*
|
||||
* @param fromClasses The classes to get [Patch]es from.
|
||||
*/
|
||||
sealed class PatchBundleLoader private constructor(
|
||||
@ -74,5 +75,8 @@ sealed class PatchBundleLoader private constructor(
|
||||
}
|
||||
.map { classDef -> classDef.type.substring(1, classDef.length - 1) }
|
||||
.map { loadClass(it) }
|
||||
})
|
||||
}) {
|
||||
@Deprecated("This constructor is deprecated. Use the constructor with the second parameter instead.")
|
||||
constructor(vararg patchBundles: File) : this(*patchBundles, optimizedDexDirectory = null)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user