mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 09:07:46 +01:00
fix: migrate to new proxy
api
This commit is contained in:
parent
95b8d60404
commit
db32ffe56a
6 changed files with 7 additions and 13 deletions
|
@ -5,14 +5,13 @@ import app.revanced.patcher.annotation.Description
|
|||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.impl.BytecodeData
|
||||
import app.revanced.patcher.data.impl.proxy
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.annotations.Dependencies
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Dependencies
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patcher.util.smali.toInstructions
|
||||
|
|
|
@ -4,7 +4,6 @@ import app.revanced.patcher.annotation.Description
|
|||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.impl.BytecodeData
|
||||
import app.revanced.patcher.data.impl.proxy
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.annotations.Dependencies
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
|
|
|
@ -4,7 +4,6 @@ import app.revanced.patcher.annotation.Description
|
|||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.impl.BytecodeData
|
||||
import app.revanced.patcher.data.impl.proxy
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||
|
|
|
@ -5,9 +5,9 @@ import app.revanced.patcher.annotation.Description
|
|||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.impl.ResourceData
|
||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Name("resource-id-mapping-provider-resource-patch-dependency")
|
||||
|
@ -20,7 +20,7 @@ class ResourceIdMappingProviderResourcePatch : ResourcePatch() {
|
|||
}
|
||||
|
||||
override fun execute(data: ResourceData): PatchResult {
|
||||
data.getXmlEditor("res/values/public.xml").use { editor ->
|
||||
data.xmlEditor["res/values/public.xml"].use { editor ->
|
||||
resourceMappings = buildMap {
|
||||
editor.file.documentElement.doRecursively { node ->
|
||||
if (node !is Element) return@doRecursively
|
||||
|
|
|
@ -5,7 +5,6 @@ import app.revanced.patcher.annotation.Description
|
|||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.impl.BytecodeData
|
||||
import app.revanced.patcher.data.impl.proxy
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.annotations.Dependencies
|
||||
|
@ -14,7 +13,6 @@ import app.revanced.patcher.patch.impl.BytecodePatch
|
|||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||
import app.revanced.patcher.util.smali.toInstruction
|
||||
import app.revanced.patches.youtube.layout.castbutton.patch.HideCastButtonPatch
|
||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
||||
|
|
|
@ -4,10 +4,9 @@ import app.revanced.patcher.annotation.Description
|
|||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.impl.ResourceData
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
||||
import app.revanced.patches.youtube.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME
|
||||
import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_APP_NAME
|
||||
|
@ -19,7 +18,7 @@ import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_PACKAG
|
|||
@Version("0.0.1")
|
||||
class MicroGResourcePatch : ResourcePatch() {
|
||||
override fun execute(data: ResourceData): PatchResult {
|
||||
data.getXmlEditor("res/xml/settings_fragment.xml").use {
|
||||
data.xmlEditor["res/xml/settings_fragment.xml"].use {
|
||||
val settingsElementIntent = it.file.createElement("intent")
|
||||
settingsElementIntent.setAttribute("android:targetPackage", "$BASE_MICROG_PACKAGE_NAME.android.gms")
|
||||
settingsElementIntent.setAttribute("android:targetClass", "org.microg.gms.ui.SettingsActivity")
|
||||
|
|
Loading…
Reference in a new issue