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.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.reddit.customclients.infinityforreddit.api.SpoofClientPatch
|
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.StartSubscriptionActivityFingerprint
|
||||||
|
import app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints.SubscriptionActivityOnCreateFingerprint
|
||||||
import app.revanced.util.returnEarly
|
import app.revanced.util.returnEarly
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
|
@ -18,7 +19,8 @@ import app.revanced.util.returnEarly
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object UnlockSubscriptionPatch : BytecodePatch(
|
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 a new issue