mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-28 21:00:19 +02:00
chore: lint code
This commit is contained in:
parent
8d9da83fc5
commit
0a24483224
@ -24,8 +24,10 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
|||||||
description = "Changes the YouTube Music app icon to the icon specified in options.json.",
|
description = "Changes the YouTube Music app icon to the icon specified in options.json.",
|
||||||
compatiblePackages = COMPATIBLE_PACKAGE
|
compatiblePackages = COMPATIBLE_PACKAGE
|
||||||
) {
|
) {
|
||||||
private const val ADAPTIVE_ICON_BACKGROUND_FILE_NAME = "adaptiveproduct_youtube_music_background_color_108"
|
private const val ADAPTIVE_ICON_BACKGROUND_FILE_NAME =
|
||||||
private const val ADAPTIVE_ICON_FOREGROUND_FILE_NAME = "adaptiveproduct_youtube_music_foreground_color_108"
|
"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 const val DEFAULT_ICON = "revancify_blue"
|
||||||
|
|
||||||
private val availableIcon = mapOf(
|
private val availableIcon = mapOf(
|
||||||
|
@ -5,7 +5,7 @@ import com.android.tools.smali.dexlib2.util.MethodUtil
|
|||||||
|
|
||||||
internal object PrimesApiFingerprint : MethodFingerprint(
|
internal object PrimesApiFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
strings = listOf("PrimesApiImpl.java"),
|
strings = listOf("PrimesApiImpl.java"),
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
MethodUtil.isConstructor(methodDef)
|
MethodUtil.isConstructor(methodDef)
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@ internal object PrimesBackgroundInitializationFingerprint : MethodFingerprint(
|
|||||||
methodDef.indexOfFirstInstruction {
|
methodDef.indexOfFirstInstruction {
|
||||||
opcode == Opcode.CONST_STRING &&
|
opcode == Opcode.CONST_STRING &&
|
||||||
getReference<StringReference>()
|
getReference<StringReference>()
|
||||||
?.string.toString().startsWith("Primes init triggered from background in package:")
|
?.string.toString()
|
||||||
|
.startsWith("Primes init triggered from background in package:")
|
||||||
} >= 0
|
} >= 0
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -17,7 +17,8 @@ internal object PrimesLifecycleEventFingerprint : MethodFingerprint(
|
|||||||
methodDef.indexOfFirstInstruction {
|
methodDef.indexOfFirstInstruction {
|
||||||
opcode == Opcode.CONST_STRING &&
|
opcode == Opcode.CONST_STRING &&
|
||||||
getReference<StringReference>()
|
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
|
} >= 0
|
||||||
}
|
}
|
||||||
)
|
)
|
@ -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
|
* https://github.com/BiliRoamingX/BiliRoamingX/blob/ae58109f3acdd53ec2d2b3fb439c2a2ef1886221/patches/src/main/kotlin/app/revanced/patches/bilibili/utils/Extenstions.kt#L151
|
||||||
*/
|
*/
|
||||||
fun MutableMethod.getFiveRegisters(index: Int) =
|
fun MutableMethod.getFiveRegisters(index: Int) =
|
||||||
with (getInstruction<FiveRegisterInstruction>(index)) {
|
with(getInstruction<FiveRegisterInstruction>(index)) {
|
||||||
arrayOf(registerC, registerD, registerE, registerF, registerG)
|
arrayOf(registerC, registerD, registerE, registerF, registerG)
|
||||||
.take(registerCount).joinToString(",") { "v$it" }
|
.take(registerCount).joinToString(",") { "v$it" }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user