fix(Reddit clients): Fix patching broken during patcher migration by searching for strings with contains(#6681)
This commit is contained in:
parent
adcaa11953
commit
00da402770
2 changed files with 7 additions and 6 deletions
|
|
@ -1,12 +1,13 @@
|
||||||
package app.revanced.patches.reddit.customclients.infinityforreddit.subscription
|
package app.revanced.patches.reddit.customclients.infinityforreddit.subscription
|
||||||
|
|
||||||
import app.revanced.patcher.gettingFirstMethod
|
|
||||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.invoke
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
import app.revanced.patcher.patch.BytecodePatchContext
|
import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
|
|
||||||
internal val BytecodePatchContext.billingClientOnServiceConnectedMethod by gettingFirstMethod("Billing service connected")
|
internal val BytecodePatchContext.billingClientOnServiceConnectedMethod by gettingFirstMethodDeclaratively {
|
||||||
|
instructions("Billing service connected"(String::contains))
|
||||||
|
}
|
||||||
|
|
||||||
internal val BytecodePatchContext.startSubscriptionActivityMethod by gettingFirstMethodDeclaratively {
|
internal val BytecodePatchContext.startSubscriptionActivityMethod by gettingFirstMethodDeclaratively {
|
||||||
instructions(0x10008000L())
|
instructions(0x10008000L())
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package app.revanced.patches.reddit.customclients.sync.syncforreddit.api
|
||||||
|
|
||||||
import app.revanced.patcher.ClassDefComposing
|
import app.revanced.patcher.ClassDefComposing
|
||||||
import app.revanced.patcher.composingFirstMethod
|
import app.revanced.patcher.composingFirstMethod
|
||||||
import app.revanced.patcher.gettingFirstMethod
|
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||||
import app.revanced.patcher.instructions
|
import app.revanced.patcher.instructions
|
||||||
import app.revanced.patcher.invoke
|
import app.revanced.patcher.invoke
|
||||||
import app.revanced.patcher.patch.BytecodePatchContext
|
import app.revanced.patcher.patch.BytecodePatchContext
|
||||||
|
|
@ -17,9 +17,9 @@ internal val ClassDef.getBearerTokenMethodMatch by ClassDefComposing.composingFi
|
||||||
instructions(string { contains("Basic") })
|
instructions(string { contains("Basic") })
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val BytecodePatchContext.getUserAgentMethod by gettingFirstMethod(
|
internal val BytecodePatchContext.getUserAgentMethod by gettingFirstMethodDeclaratively {
|
||||||
"android:com.laurencedawson.reddit_sync",
|
instructions("android:com.laurencedawson.reddit_sync"(String::contains))
|
||||||
)
|
}
|
||||||
|
|
||||||
internal val BytecodePatchContext.imgurImageAPIMethodMatch by composingFirstMethod {
|
internal val BytecodePatchContext.imgurImageAPIMethodMatch by composingFirstMethod {
|
||||||
instructions("https://imgur-apiv3.p.rapidapi.com/3/image"())
|
instructions("https://imgur-apiv3.p.rapidapi.com/3/image"())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue