feat(music): add enable-debug-logging patch

This commit is contained in:
inotia00
2023-06-29 18:12:47 +09:00
parent 13b8670391
commit 93dcba2582
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package app.revanced.patches.music.misc.debugging.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
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.music.utils.annotations.MusicCompatibility
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
import app.revanced.util.enum.CategoryType
@Patch(false)
@Name("enable-debug-logging")
@Description("Adds debugging options.")
@DependsOn([SettingsPatch::class])
@MusicCompatibility
@Version("0.0.1")
class DebuggingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.addMusicPreference(
CategoryType.MISC,
"revanced_enable_debug_logging",
"false"
)
return PatchResultSuccess()
}
}