fix(enable-android-debugging): remove json options (#2497)
This commit is contained in:
parent
4392f108ed
commit
3e25f5f8df
|
@ -14,7 +14,6 @@ import org.w3c.dom.Element
|
|||
@Version("0.0.1")
|
||||
class EnableAndroidDebuggingPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
if (debuggable == true) {
|
||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
||||
val applicationNode = dom
|
||||
.file
|
||||
|
@ -24,19 +23,8 @@ class EnableAndroidDebuggingPatch : ResourcePatch {
|
|||
// set application as debuggable
|
||||
applicationNode.setAttribute("android:debuggable", "true")
|
||||
}
|
||||
}
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
companion object : OptionsContainer() {
|
||||
var debuggable: Boolean? by option(
|
||||
PatchOption.BooleanOption(
|
||||
key = "debuggable",
|
||||
default = false,
|
||||
title = "App debugging",
|
||||
description = "Whether to make the app debuggable on Android.",
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.all.misc.debugging.patch.EnableAndroidDebuggingPatch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.debugging.annotations.DebuggingCompatibility
|
||||
|
@ -18,7 +17,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
|||
|
||||
@Patch
|
||||
@Name("enable-debugging")
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class, EnableAndroidDebuggingPatch::class])
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Description("Adds debugging options.")
|
||||
@DebuggingCompatibility
|
||||
@Version("0.0.2")
|
||||
|
|
Loading…
Reference in a new issue