fix(Check environment): Use another (also more suitable) API to circumvent a bug
This commit is contained in:
parent
380be33fed
commit
393700f74a
2 changed files with 5 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ fun checkEnvironmentPatch(
|
|||
) = bytecodePatch(
|
||||
description = "Checks, if the application was patched by, otherwise warns the user.",
|
||||
) {
|
||||
compatibleWith(*compatiblePackages)
|
||||
compatibleWith(packages = compatiblePackages)
|
||||
|
||||
dependsOn(
|
||||
extensionPatch,
|
||||
|
|
@ -41,7 +41,7 @@ fun checkEnvironmentPatch(
|
|||
|
||||
fun setPatchInfo() {
|
||||
fun <T : MutableEncodedValue> MutableClassDef.setClassFields(vararg fieldNameValues: Pair<String, T>) {
|
||||
val fieldNameValueMap = mapOf(*fieldNameValues)
|
||||
val fieldNameValueMap = mapOf(pairs = fieldNameValues)
|
||||
|
||||
fields.forEach { field ->
|
||||
field.initialValue = fieldNameValueMap[field.name] ?: return@forEach
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
package app.revanced.patches.shared.misc.checks
|
||||
|
||||
import app.revanced.patcher.gettingFirstClassDef
|
||||
import app.revanced.patcher.gettingFirstClassDefDeclaratively
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
|
||||
internal val BytecodePatchContext.patchInfoClassDef by gettingFirstClassDefDeclaratively(
|
||||
internal val BytecodePatchContext.patchInfoClassDef by gettingFirstClassDef(
|
||||
"Lapp/revanced/extension/shared/checks/PatchInfo;"
|
||||
)
|
||||
|
||||
internal val BytecodePatchContext.patchInfoBuildClassDef by gettingFirstClassDefDeclaratively(
|
||||
internal val BytecodePatchContext.patchInfoBuildClassDef by gettingFirstClassDef(
|
||||
$$"Lapp/revanced/extension/shared/checks/PatchInfo$Build;"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue