Skip to content

Commit f8343ae

Browse files
NuckyzoSumAtrIX
andauthored
refactor(Spotify): Improve protobuf array list mutability patch (#5053)
Co-authored-by: oSumAtrIX <[email protected]>
1 parent 3ba791a commit f8343ae

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

patches/src/main/kotlin/app/revanced/patches/spotify/misc/Fingerprints.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,15 @@ internal val protobufListsFingerprint = fingerprint {
6565
custom { method, _ -> method.name == "emptyProtobufList" }
6666
}
6767

68-
internal val protobufListRemoveFingerprint = fingerprint {
69-
custom { method, _ -> method.name == "remove" }
68+
internal val abstractProtobufListEnsureIsMutableFingerprint = fingerprint {
69+
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
70+
parameters()
71+
returns("V")
72+
custom { method, _ ->
73+
method.indexOfFirstInstruction {
74+
getReference<TypeReference>()?.type == "Ljava/lang/UnsupportedOperationException;"
75+
} >= 0
76+
}
7077
}
7178

7279
internal val homeSectionFingerprint = fingerprint {

0 commit comments

Comments
 (0)