fix: Use custom comparison block for strings in anyOf

This commit is contained in:
drobotk 2026-03-02 23:26:26 +01:00
parent 8125741d90
commit 56a087dbac
No known key found for this signature in database
GPG key ID: 4B532DAB8340742C
2 changed files with 4 additions and 4 deletions

View file

@ -13,8 +13,8 @@ internal val BytecodePatchContext.tabLayoutTextMethodMatch by composingFirstMeth
parameterTypes("L")
instructions(
anyOf(
"FEmusic_search"(), // 8.49 and lower.
"FEsearch"() // 8.50+
"FEmusic_search" { equals(it) }, // 8.49 and lower. Must use custom comparison block, otherwise string is added to stringsList for lookup
"FEsearch" { equals(it) } // 8.50+
),
// Hide navigation label.
ResourceType.ID("text1"),

View file

@ -60,9 +60,9 @@ internal fun ClassDef.getSeekMethod() = firstImmutableMethodDeclaratively {
instructions(
anyOf(
// 20.xx
"Attempting to seek during an ad"(),
"Attempting to seek during an ad" { equals(it) }, // Must use custom comparison block, otherwise string is added to stringsList for lookup
// 21.02+
"currentPositionMs."()
"currentPositionMs." { equals(it) }
)
)
}