feat(YouTube ): Remove HDR auto brightness
patch (#2863)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
f69658d136
commit
b4c7bf4808
|
@ -14,13 +14,14 @@ 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.instruction.TwoRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
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(
|
@Patch(
|
||||||
name = "HDR auto brightness",
|
|
||||||
description = "Adds an option to make the brightness of HDR videos follow the system default.",
|
description = "Adds an option to make the brightness of HDR videos follow the system default.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class, AddResourcesPatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsPatch::class, AddResourcesPatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
"com.google.android.youtube", [
|
"com.google.android.youtube",
|
||||||
|
[
|
||||||
"18.32.39",
|
"18.32.39",
|
||||||
"18.37.36",
|
"18.37.36",
|
||||||
"18.38.44",
|
"18.38.44",
|
||||||
|
@ -33,20 +34,20 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||||
"19.02.39",
|
"19.02.39",
|
||||||
"19.03.35",
|
"19.03.35",
|
||||||
"19.03.36",
|
"19.03.36",
|
||||||
"19.04.37"
|
"19.04.37",
|
||||||
]
|
],
|
||||||
)
|
),
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HDRBrightnessPatch : BytecodePatch(
|
object HDRBrightnessPatch : BytecodePatch(
|
||||||
setOf(HDRBrightnessFingerprint)
|
setOf(HDRBrightnessFingerprint),
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
AddResourcesPatch(this::class)
|
AddResourcesPatch(this::class)
|
||||||
|
|
||||||
SettingsPatch.PreferenceScreen.VIDEO.addPreferences(
|
SettingsPatch.PreferenceScreen.VIDEO.addPreferences(
|
||||||
SwitchPreference("revanced_hdr_auto_brightness")
|
SwitchPreference("revanced_hdr_auto_brightness"),
|
||||||
)
|
)
|
||||||
|
|
||||||
val method = HDRBrightnessFingerprint.result!!.mutableMethod
|
val method = HDRBrightnessFingerprint.result!!.mutableMethod
|
||||||
|
@ -64,7 +65,7 @@ object HDRBrightnessPatch : BytecodePatch(
|
||||||
"""
|
"""
|
||||||
invoke-static {v$register}, Lapp/revanced/integrations/youtube/patches/HDRAutoBrightnessPatch;->getHDRBrightness(F)F
|
invoke-static {v$register}, Lapp/revanced/integrations/youtube/patches/HDRAutoBrightnessPatch;->getHDRBrightness(F)F
|
||||||
move-result v$register
|
move-result v$register
|
||||||
"""
|
""",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue