refactor: move the patch to the correct path

This commit is contained in:
inotia00
2023-06-18 23:09:08 +09:00
parent 03148b5c81
commit 5c99e9a16a
410 changed files with 3807 additions and 3505 deletions

View File

@ -1,9 +1,11 @@
package app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object SwipeControlsHostActivityFingerprint : MethodFingerprint(
customFingerprint = { it, _ -> it.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;"
&& it.name == "<init>"
}
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
parameters = emptyList(),
customFingerprint = { it, _ -> it.definingClass == "Lapp/revanced/integrations/swipecontrols/SwipeControlsHostActivity;" }
)

View File

@ -1,10 +1,11 @@
package app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object WatchWhileActivityFingerprint : MethodFingerprint(
customFingerprint = { it, _ ->
it.definingClass.endsWith("WatchWhileActivity;")
&& it.name == "<init>"
}
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
parameters = emptyList(),
customFingerprint = { it, _ -> it.definingClass.endsWith("WatchWhileActivity;") && it.name == "<init>" }
)

View File

@ -12,7 +12,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.util.TypeUtil.traverseClassHierarchy
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
import app.revanced.patches.youtube.utils.playertype.patch.PlayerTypeHookPatch
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints.SwipeControlsHostActivityFingerprint
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.fingerprints.WatchWhileActivityFingerprint
import org.jf.dexlib2.AccessFlags
@ -21,11 +21,7 @@ import org.jf.dexlib2.immutable.ImmutableMethod
@Name("swipe-controls-bytecode-patch")
@YouTubeCompatibility
@Version("0.0.3")
@DependsOn(
[
PlayerTypeHookPatch::class
]
)
@DependsOn([PlayerTypeHookPatch::class])
class SwipeControlsBytecodePatch : BytecodePatch(
listOf(
SwipeControlsHostActivityFingerprint,

View File

@ -10,9 +10,9 @@ import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.patches.youtube.swipe.hdrbrightness.patch.HDRBrightnessPatch
import app.revanced.patches.youtube.swipe.swipecontrols.bytecode.patch.SwipeControlsBytecodePatch
import app.revanced.patches.youtube.swipe.swipecontrolshdr.patch.SwipeControlsHDRPatch
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
import app.revanced.util.resources.ResourceUtils
import app.revanced.util.resources.ResourceUtils.copyResources
@ -21,9 +21,9 @@ import app.revanced.util.resources.ResourceUtils.copyResources
@Description("Adds volume and brightness swipe controls.")
@DependsOn(
[
HDRBrightnessPatch::class,
SettingsPatch::class,
SwipeControlsBytecodePatch::class,
SwipeControlsHDRPatch::class
SwipeControlsBytecodePatch::class
]
)
@YouTubeCompatibility
@ -31,7 +31,7 @@ import app.revanced.util.resources.ResourceUtils.copyResources
class SwipeControlsPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
/*
/**
* Add settings
*/
SettingsPatch.addPreference(