diff --git a/src/main/kotlin/app/revanced/patches/youtube/player/playeroverlayfilter/PlayerOverlayFilterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/player/playeroverlayfilter/PlayerOverlayFilterPatch.kt deleted file mode 100644 index 423690f8c..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/player/playeroverlayfilter/PlayerOverlayFilterPatch.kt +++ /dev/null @@ -1,84 +0,0 @@ -package app.revanced.patches.youtube.player.playeroverlayfilter - -import app.revanced.extensions.exception -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction -import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.annotation.CompatiblePackage -import app.revanced.patcher.patch.annotation.Patch -import app.revanced.patches.youtube.utils.fingerprints.YouTubeControlsOverlayFingerprint -import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch -import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.ScrimOverlay -import app.revanced.patches.youtube.utils.settings.SettingsPatch -import app.revanced.util.bytecode.getWideLiteralIndex -import app.revanced.util.integrations.Constants.PLAYER -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction - -@Patch( - name = "Hide player overlay filter", - description = "Hides the dark filter layer from the player's background.", - dependencies = [ - SettingsPatch::class, - SharedResourceIdPatch::class - ], - compatiblePackages = [ - CompatiblePackage( - "com.google.android.youtube", - [ - "18.24.37", - "18.25.40", - "18.27.36", - "18.29.38", - "18.30.37", - "18.31.40", - "18.32.39", - "18.33.40", - "18.34.38", - "18.35.36", - "18.36.39", - "18.37.36", - "18.38.44", - "18.39.41" - ] - ) - ] -) -@Suppress("unused") -object PlayerOverlayFilterPatch : BytecodePatch( - setOf(YouTubeControlsOverlayFingerprint) -) { - override fun execute(context: BytecodeContext) { - - YouTubeControlsOverlayFingerprint.result?.let { - it.mutableMethod.apply { - val targetIndex = getWideLiteralIndex(ScrimOverlay) + 3 - val targetParameter = getInstruction(targetIndex).reference - val targetRegister = getInstruction(targetIndex).registerA - - if (!targetParameter.toString().endsWith("Landroid/widget/ImageView;")) - throw PatchException("Method signature parameter did not match: $targetParameter") - - addInstruction( - targetIndex + 1, - "invoke-static {v$targetRegister}, $PLAYER->hidePlayerOverlayFilter(Landroid/widget/ImageView;)V" - ) - } - } ?: throw YouTubeControlsOverlayFingerprint.exception - - /** - * Add settings - */ - SettingsPatch.addPreference( - arrayOf( - "PREFERENCE: PLAYER_SETTINGS", - "SETTINGS: HIDE_PLAYER_OVERLAY_FILTER" - ) - ) - - SettingsPatch.updatePatchStatus("Hide player overlay filter") - - } -} \ No newline at end of file diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index 03ac78857..32efb82ae 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -453,9 +453,6 @@ Watch in VR menu is shown Watch in VR menu is hidden Hide watch in VR menu - Player overlay filter is shown - Player overlay filter is hidden - Hide player overlay filter Preview comment is shown Preview comment is hidden Hide preview comment diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index e4cc81945..4a27e9033 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -401,7 +401,6 @@ - @@ -522,9 +521,6 @@ - -