mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-19 01:39:33 +01:00
fix(Infinity for Reddit - Unlock subscription): Restore functionality on v7.0.0
This commit is contained in:
parent
82e226d124
commit
bf19af99cb
@ -6,6 +6,7 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.reddit.customclients.infinityforreddit.api.SpoofClientPatch
|
||||
import app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints.StartSubscriptionActivityFingerprint
|
||||
import app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints.SubscriptionActivityOnCreateFingerprint
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Patch(
|
||||
@ -18,7 +19,8 @@ import app.revanced.util.returnEarly
|
||||
)
|
||||
@Suppress("unused")
|
||||
object UnlockSubscriptionPatch : BytecodePatch(
|
||||
setOf(StartSubscriptionActivityFingerprint)
|
||||
setOf(StartSubscriptionActivityFingerprint, SubscriptionActivityOnCreateFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) = listOf(StartSubscriptionActivityFingerprint).returnEarly()
|
||||
override fun execute(context: BytecodeContext) =
|
||||
listOf(StartSubscriptionActivityFingerprint, SubscriptionActivityOnCreateFingerprint).returnEarly()
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal object SubscriptionActivityOnCreateFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
parameters = listOf("Landroid/os/Bundle;"),
|
||||
customFingerprint = { method, classDef ->
|
||||
method.name == "onCreate" && classDef.type.endsWith("SubscriptionActivity;")
|
||||
}
|
||||
)
|
Loading…
Reference in New Issue
Block a user