feat(music): add import/export-settings patch

This commit is contained in:
inotia00
2023-09-18 18:46:39 +09:00
parent f6938a2665
commit 46dda20e77
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package app.revanced.patches.music.misc.importexport.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
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.intenthook.patch.IntentHookPatch
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
import app.revanced.util.enum.CategoryType
@Patch
@Name("Import/Export settings")
@Description("Import or export settings as text.")
@DependsOn(
[
IntentHookPatch::class,
SettingsPatch::class
]
)
@MusicCompatibility
class ImportExportPatch : BytecodePatch() {
override fun execute(context: BytecodeContext) {
SettingsPatch.addMusicPreferenceWithIntent(
CategoryType.MISC,
"revanced_extended_settings_import_export",
""
)
}
}