From b5a2b095373a2537ee3cb5337dc84c9aa5a1924d Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 11 Mar 2024 02:10:26 +0400 Subject: [PATCH] fix: deprecate instead of deleting --- .../youtube/video/hdrbrightness/HDRBrightnessPatch.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt index cb255b32c8..c5f918b0d9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt @@ -14,8 +14,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.FieldReference +@Deprecated("Patch is obsolete and the hooked code is no longer present in 19.09+") @Patch( - name = "HDR auto brightness", description = "Adds an option to make the brightness of HDR videos follow the system default.", dependencies = [IntegrationsPatch::class, SettingsPatch::class, AddResourcesPatch::class], compatiblePackages = [ @@ -43,12 +43,6 @@ object HDRBrightnessPatch : BytecodePatch( setOf(HDRBrightnessFingerprint) ) { override fun execute(context: BytecodeContext) { - AddResourcesPatch(this::class) - - SettingsPatch.PreferenceScreen.VIDEO.addPreferences( - SwitchPreference("revanced_hdr_auto_brightness") - ) - val method = HDRBrightnessFingerprint.result!!.mutableMethod method.implementation!!.instructions.filter { instruction ->