mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-29 05:10:20 +02:00
fix build error
This commit is contained in:
parent
6b457685d5
commit
9c58a5a1ee
@ -23,6 +23,42 @@ object ComponentParserPatch : BytecodePatch(
|
||||
IdentifierFingerprint
|
||||
)
|
||||
) {
|
||||
internal lateinit var emptyComponentLabel: String
|
||||
private lateinit var insertMethod: MutableMethod
|
||||
|
||||
private var emptyComponentIndex by Delegates.notNull<Int>()
|
||||
private var insertIndex by Delegates.notNull<Int>()
|
||||
|
||||
private var identifierRegister by Delegates.notNull<Int>()
|
||||
private var objectRegister by Delegates.notNull<Int>()
|
||||
private var stringBuilderRegister by Delegates.notNull<Int>()
|
||||
|
||||
internal fun generalHook(descriptor: String) {
|
||||
insertMethod.apply {
|
||||
addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static {v$stringBuilderRegister, v$identifierRegister, v$objectRegister}, $descriptor(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/Object;)Z
|
||||
move-result v$stringBuilderRegister
|
||||
if-nez v$stringBuilderRegister, :filter
|
||||
""", ExternalLabel("filter", getInstruction(emptyComponentIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
internal fun pathBuilderHook(descriptor: String) {
|
||||
insertMethod.apply {
|
||||
addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static {v$stringBuilderRegister}, $descriptor(Ljava/lang/StringBuilder;)Z
|
||||
move-result v$stringBuilderRegister
|
||||
if-nez v$stringBuilderRegister, :filter
|
||||
""", ExternalLabel("filter", getInstruction(emptyComponentIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
/**
|
||||
@ -75,40 +111,4 @@ object ComponentParserPatch : BytecodePatch(
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lateinit var emptyComponentLabel: String
|
||||
lateinit var insertMethod: MutableMethod
|
||||
|
||||
var emptyComponentIndex by Delegates.notNull<Int>()
|
||||
var insertIndex by Delegates.notNull<Int>()
|
||||
|
||||
var identifierRegister by Delegates.notNull<Int>()
|
||||
var objectRegister by Delegates.notNull<Int>()
|
||||
var stringBuilderRegister by Delegates.notNull<Int>()
|
||||
|
||||
fun generalHook(descriptor: String) {
|
||||
insertMethod.apply {
|
||||
addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static {v$stringBuilderRegister, v$identifierRegister, v$objectRegister}, $descriptor(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/Object;)Z
|
||||
move-result v$stringBuilderRegister
|
||||
if-nez v$stringBuilderRegister, :filter
|
||||
""", ExternalLabel("filter", getInstruction(emptyComponentIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun pathBuilderHook(descriptor: String) {
|
||||
insertMethod.apply {
|
||||
addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
"""
|
||||
invoke-static {v$stringBuilderRegister}, $descriptor(Ljava/lang/StringBuilder;)Z
|
||||
move-result v$stringBuilderRegister
|
||||
if-nez v$stringBuilderRegister, :filter
|
||||
""", ExternalLabel("filter", getInstruction(emptyComponentIndex))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -3,8 +3,10 @@ package app.revanced.patches.youtube.utils.settings
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
|
||||
import app.revanced.patches.shared.patch.settings.AbstractSettingsResourcePatch
|
||||
import app.revanced.patches.youtube.utils.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.util.resources.IconHelper.YOUTUBE_LAUNCHER_ICON_ARRAY
|
||||
import app.revanced.util.resources.IconHelper.copyFiles
|
||||
import app.revanced.util.resources.IconHelper.makeDirectoryAndCopyFiles
|
||||
@ -24,6 +26,8 @@ import java.util.concurrent.TimeUnit
|
||||
description = "Applies mandatory patches to implement ReVanced Extended settings into the application.",
|
||||
dependencies = [
|
||||
IntegrationsPatch::class,
|
||||
ResourceMappingPatch::class,
|
||||
SharedResourceIdPatch::class,
|
||||
SettingsBytecodePatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user