mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 21:27:43 +02:00
chore: lint code
This commit is contained in:
@ -85,7 +85,8 @@ abstract class BaseAdsPatch(
|
||||
internal fun MethodFingerprintResult.hookLithoFullscreenAds(context: BytecodeContext) {
|
||||
mutableMethod.apply {
|
||||
val dialogCodeIndex = scanResult.patternScanResult!!.endIndex
|
||||
val dialogCodeField = getInstruction<ReferenceInstruction>(dialogCodeIndex).reference as FieldReference
|
||||
val dialogCodeField =
|
||||
getInstruction<ReferenceInstruction>(dialogCodeIndex).reference as FieldReference
|
||||
if (dialogCodeField.type != "I")
|
||||
throw PatchException("Invalid dialogCodeField: $dialogCodeField")
|
||||
|
||||
@ -119,7 +120,8 @@ abstract class BaseAdsPatch(
|
||||
method.parameters == listOf("I")
|
||||
&& method.returnType == "Landroid/widget/Button;"
|
||||
}
|
||||
val getButtonCall = dialogDefiningClass + "->" + getButtonMethod.name + "(I)Landroid/widget/Button;"
|
||||
val getButtonCall =
|
||||
dialogDefiningClass + "->" + getButtonMethod.name + "(I)Landroid/widget/Button;"
|
||||
val dialogRegister = getInstruction<FiveRegisterInstruction>(dialogIndex).registerC
|
||||
val freeIndex = getTargetIndex(dialogIndex, Opcode.IF_EQZ)
|
||||
val freeRegister = getInstruction<OneRegisterInstruction>(freeIndex).registerA
|
||||
|
@ -38,12 +38,13 @@ object TranslationsUtils {
|
||||
// Exception is thrown if an invalid path is used in the patch option.
|
||||
throw PatchException("Invalid custom translations path: $customLang")
|
||||
}
|
||||
}?: run {
|
||||
} ?: run {
|
||||
// Process selected translations if no custom translation is set.
|
||||
val selectedTranslationsArray =
|
||||
selectedTranslations?.split(",")?.map { it.trim() }?.toTypedArray()
|
||||
?: throw PatchException("Invalid selected languages.")
|
||||
val filteredLanguages = translationsArray.filter { it in selectedTranslationsArray }.toTypedArray()
|
||||
val filteredLanguages =
|
||||
translationsArray.filter { it in selectedTranslationsArray }.toTypedArray()
|
||||
copyXml(sourceDirectory, filteredLanguages)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user