chore: lint code

This commit is contained in:
inotia00 2024-10-20 20:46:13 +09:00
parent 8d9da83fc5
commit 0a24483224
5 changed files with 10 additions and 6 deletions

View File

@ -24,8 +24,10 @@ object CustomBrandingIconPatch : BaseResourcePatch(
description = "Changes the YouTube Music app icon to the icon specified in options.json.",
compatiblePackages = COMPATIBLE_PACKAGE
) {
private const val ADAPTIVE_ICON_BACKGROUND_FILE_NAME = "adaptiveproduct_youtube_music_background_color_108"
private const val ADAPTIVE_ICON_FOREGROUND_FILE_NAME = "adaptiveproduct_youtube_music_foreground_color_108"
private const val ADAPTIVE_ICON_BACKGROUND_FILE_NAME =
"adaptiveproduct_youtube_music_background_color_108"
private const val ADAPTIVE_ICON_FOREGROUND_FILE_NAME =
"adaptiveproduct_youtube_music_foreground_color_108"
private const val DEFAULT_ICON = "revancify_blue"
private val availableIcon = mapOf(

View File

@ -12,7 +12,8 @@ internal object PrimesBackgroundInitializationFingerprint : MethodFingerprint(
methodDef.indexOfFirstInstruction {
opcode == Opcode.CONST_STRING &&
getReference<StringReference>()
?.string.toString().startsWith("Primes init triggered from background in package:")
?.string.toString()
.startsWith("Primes init triggered from background in package:")
} >= 0
}
)

View File

@ -17,7 +17,8 @@ internal object PrimesLifecycleEventFingerprint : MethodFingerprint(
methodDef.indexOfFirstInstruction {
opcode == Opcode.CONST_STRING &&
getReference<StringReference>()
?.string.toString().startsWith("Primes did not observe lifecycle events in the expected order.")
?.string.toString()
.startsWith("Primes did not observe lifecycle events in the expected order.")
} >= 0
}
)

View File

@ -514,7 +514,7 @@ fun MutableMethod.getWalkerMethod(context: BytecodeContext, offset: Int): Mutabl
* https://github.com/BiliRoamingX/BiliRoamingX/blob/ae58109f3acdd53ec2d2b3fb439c2a2ef1886221/patches/src/main/kotlin/app/revanced/patches/bilibili/utils/Extenstions.kt#L151
*/
fun MutableMethod.getFiveRegisters(index: Int) =
with (getInstruction<FiveRegisterInstruction>(index)) {
with(getInstruction<FiveRegisterInstruction>(index)) {
arrayOf(registerC, registerD, registerE, registerF, registerG)
.take(registerCount).joinToString(",") { "v$it" }
}