mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01: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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue