Skip to content

Commit

Permalink
fix(Soundcloud): Support latest versions (ReVanced#3702)
Browse files Browse the repository at this point in the history
  • Loading branch information
FullerBread2032 authored Sep 29, 2024
1 parent 2d203bd commit 099ac5e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ internal object InterceptFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT_OBJECT
),
strings = listOf("SC-Mob-UserPlan", "Configuration"),
customFingerprint = { _, classDef ->
classDef.sourceFile == "ApiUserPlanInterceptor.java" ||
classDef.sourceFile == "ApiUserPlanInterceptor.kt"
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ internal object UserConsumerPlanConstructorFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
parameters = listOf("Ljava/lang/String;", "Z", "Ljava/lang/String;", "Ljava/util/List;", "Ljava/lang/String;", "Ljava/lang/String;"),
customFingerprint = { _, classDef ->
classDef.sourceFile == "UserConsumerPlan.kt"
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ internal object CreateTrackingApiFingerprint : MethodFingerprint(
returnType = "L",
accessFlags = AccessFlags.PUBLIC.value,
customFingerprint = { methodDef, classDef ->
classDef.sourceFile == "DefaultTrackingApiFactory.kt" && methodDef.name == "create"
methodDef.name == "create"
},
strings = listOf("backend", "boogaloo")
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ internal object DownloadOperationsHeaderVerificationFingerprint : MethodFingerpr
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING
),
customFingerprint = { _, classDef ->
classDef.sourceFile == "DownloadOperations.kt"
}
strings = listOf("X-SC-Mime-Type", "X-SC-Preset", "X-SC-Quality")
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ internal object DownloadOperationsURLBuilderFingerprint : MethodFingerprint(
Opcode.SGET_OBJECT,
Opcode.FILLED_NEW_ARRAY
),
customFingerprint = { _, classDef ->
classDef.sourceFile == "DownloadOperations.kt"
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ package app.revanced.patches.soundcloud.shared.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode


internal object FeatureConstructorFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
parameters = listOf("Ljava/lang/String;", "Z", "Ljava/util/List;"),
customFingerprint = { _, classDef ->
classDef.sourceFile == "Feature.kt"
},
opcodes = listOf(
Opcode.SGET_OBJECT,
Opcode.CHECK_CAST,
Opcode.INVOKE_VIRTUAL
)
)

0 comments on commit 099ac5e

Please sign in to comment.