mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-19 00:53:57 +00:00
refactor(pandora): EnableUnlimitedSkipsPatch
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
package app.revanced.patches.pandora.misc
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val enableUnlimitedSkipsPatch = bytecodePatch(
|
||||
name = "Enable unlimited skips",
|
||||
@Suppress("unused", "ObjectPropertyName")
|
||||
val `Enable Unlimited Skips` by creatingBytecodePatch(
|
||||
description = "Enable unlimited skips"
|
||||
) {
|
||||
compatibleWith("com.pandora.android")
|
||||
|
||||
apply {
|
||||
skipLimitBehaviorFingerprint.method.returnEarly("unlimited")
|
||||
skipLimitBehaviorMethod.returnEarly("unlimited")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package app.revanced.patches.pandora.misc
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.BytecodePatchContextMethodMatching.gettingFirstMutableMethodDeclaratively
|
||||
import app.revanced.patcher.definingClass
|
||||
import app.revanced.patcher.name
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
|
||||
internal val skipLimitBehaviorFingerprint = fingerprint {
|
||||
custom { method, classDef ->
|
||||
method.name == "getSkipLimitBehavior" && classDef.endsWith("UserData;")
|
||||
}
|
||||
}
|
||||
internal val BytecodePatchContext.skipLimitBehaviorMethod by gettingFirstMutableMethodDeclaratively {
|
||||
name("getSkipLimitBehavior")
|
||||
definingClass("UserData;"::endsWith)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user