mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-12 15:47:45 +01:00
feat(sleepasandroid): remove unlock-premium
patch (#1253)
This commit is contained in:
parent
278abba136
commit
414f503e49
@ -1,9 +0,0 @@
|
|||||||
package app.revanced.patches.sleepasandroid.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("com.urbandroid.sleep")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
|
||||||
internal annotation class UnlockPremiumCompatibility
|
|
@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.sleepasandroid.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
object IsTrialFingerprint : MethodFingerprint(
|
|
||||||
"Z",
|
|
||||||
customFingerprint = { it.name == "isTrial" }
|
|
||||||
)
|
|
@ -1,36 +0,0 @@
|
|||||||
package app.revanced.patches.sleepasandroid.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.sleepasandroid.annotations.UnlockPremiumCompatibility
|
|
||||||
import app.revanced.patches.sleepasandroid.fingerprints.IsTrialFingerprint
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("unlock-premium")
|
|
||||||
@Description("Unlocks all premium features.")
|
|
||||||
@UnlockPremiumCompatibility
|
|
||||||
class UnlockPremiumPatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
IsTrialFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
|
||||||
val method = IsTrialFingerprint.result!!.mutableMethod
|
|
||||||
|
|
||||||
method.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x0
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user