diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt index 9de0f38356..a603602028 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt @@ -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() } diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/fingerprints/SubscriptionActivityOnCreateFingerprint.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/fingerprints/SubscriptionActivityOnCreateFingerprint.kt new file mode 100644 index 0000000000..dd5f1710de --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/fingerprints/SubscriptionActivityOnCreateFingerprint.kt @@ -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;") + } +)