Skip to content

Commit

Permalink
fix(Soundcloud - Hide ads): Support latest version (ReVanced#3628)
Browse files Browse the repository at this point in the history
Co-authored-by: FullerBread2032 <admin@fullerbread2032.tk>
  • Loading branch information
FullerBread2032 and FullerBread2032 committed Sep 14, 2024
1 parent ff8d20f commit 66e7e33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ object HideAdsPatch : BytecodePatch(

// Prevent verification of an HTTP header containing the user's current plan, which would contradict the previous patch.
InterceptFingerprint.resultOrThrow().let { result ->
val conditionIndex = result.scanResult.patternScanResult!!.endIndex
val conditionIndex = result.scanResult.patternScanResult!!.endIndex + 1
result.mutableMethod.addInstruction(
conditionIndex,
"return-object p1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ internal object InterceptFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC.value,
parameters = listOf("L"),
opcodes = listOf(
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT
),
strings = listOf("SC-Mob-UserPlan", "Configuration"),
customFingerprint = { _, classDef ->
classDef.sourceFile == "ApiUserPlanInterceptor.java"
classDef.sourceFile == "ApiUserPlanInterceptor.java" ||
classDef.sourceFile == "ApiUserPlanInterceptor.kt"
},
)

0 comments on commit 66e7e33

Please sign in to comment.