mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-30 14:44:30 +02:00
feat(youtube): remove dummy patch
This commit is contained in:
parent
910de6f27c
commit
2bc99c0e99
@ -1,7 +0,0 @@
|
||||
package app.revanced.patches.youtube.utils.playeroverlay.fingerprint
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object PlayerOverlaysOnFinishInflateFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("YouTubePlayerOverlaysLayout;") && methodDef.name == "onFinishInflate" }
|
||||
)
|
@ -1,34 +0,0 @@
|
||||
package app.revanced.patches.youtube.utils.playeroverlay.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.utils.playeroverlay.fingerprint.PlayerOverlaysOnFinishInflateFingerprint
|
||||
import app.revanced.util.integrations.Constants.UTILS_PATH
|
||||
|
||||
@Name("player-overlays-hook")
|
||||
@Description("Hook for adding custom overlays to the video player.")
|
||||
@YouTubeCompatibility
|
||||
@Version("0.0.1")
|
||||
class PlayerOverlaysHookPatch : BytecodePatch(
|
||||
listOf(PlayerOverlaysOnFinishInflateFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
// hook YouTubePlayerOverlaysLayout.onFinishInflate()
|
||||
PlayerOverlaysOnFinishInflateFingerprint.result?.mutableMethod?.let {
|
||||
it.addInstruction(
|
||||
it.implementation!!.instructions.size - 2,
|
||||
"invoke-static { p0 }, $UTILS_PATH/PlayerOverlaysHookPatch;->YouTubePlayerOverlaysLayout_onFinishInflateHook(Ljava/lang/Object;)V"
|
||||
)
|
||||
} ?: return PlayerOverlaysOnFinishInflateFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user