Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(YouTube ): Remove HDR auto brightness patch #2863

Merged
merged 6 commits into from Mar 11, 2024

Conversation

LisoUseInAIKyrios
Copy link
Contributor

Patch has been non functional for a while (and nobody has noticed).

The hooked code is never called anytime. Not on app startup, not during portrait playback, and not during fullscreen playback.

19.09.x removed the hooked code completely, and there is no direct replacement.

@MarcaDian
Copy link
Contributor

        <patch id="video.hdrbrightness.HDRBrightnessPatch">
            <string name="revanced_hdr_auto_brightness_title">Enable auto HDR brightness</string>
            <string name="revanced_hdr_auto_brightness_summary_on">Auto HDR brightness is enabled</string>
            <string name="revanced_hdr_auto_brightness_summary_off">Auto HDR brightness is disabled</string>
        </patch>

@LisoUseInAIKyrios
Copy link
Contributor Author

LisoUseInAIKyrios commented Mar 10, 2024

Digging a little deeper, I found YT is already using the same value set by this patch.

This patch does:

// do nothing if disabled
if (!Settings.HDR_AUTO_BRIGHTNESS.get()) {
    return original;
}
// otherwise, set the brightness to auto
return WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE;

Except, YT is already using WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE as the brightness.

So even if this patch is called for some other situation, it does nothing. Because if the patch is off it returns the original value (which isBRIGHTNESS_OVERRIDE_NONE), and if the patch is on it also returns BRIGHTNESS_OVERRIDE_NONE.

Copy link
Member

@oSumAtrIX oSumAtrIX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, just comment/remove the patch name. Patches have public API so other bundles can reference the patches as dependencies for example.

@oSumAtrIX oSumAtrIX changed the title fix(YouTube - HDR auto brightness): Remove non functional and obsolete patch feat(YouTube ): Remove HDR auto brightness patch Mar 11, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios merged commit b4c7bf4 into ReVanced:dev Mar 11, 2024
2 checks passed
@LisoUseInAIKyrios LisoUseInAIKyrios deleted the fix_remove_hdr_auto branch March 11, 2024 09:33
revanced-bot pushed a commit that referenced this pull request Mar 11, 2024
# [4.4.0-dev.4](v4.4.0-dev.3...v4.4.0-dev.4) (2024-03-11)

### Features

* **YouTube :** Remove `HDR auto brightness` patch ([#2863](#2863)) ([b4c7bf4](b4c7bf4))
revanced-bot pushed a commit that referenced this pull request Mar 27, 2024
# [4.4.0](v4.3.0...v4.4.0) (2024-03-27)

### Bug Fixes

* **TikTok:** Hook application context earlier to prevent crash ([#2893](#2893)) ([395ccda](395ccda))
* **YouTube - Client spoof:** Spoof all user agents ([44a8a13](44a8a13))
* **YouTube - Downloads:** Use new task context ([#2841](#2841)) ([6d88cb4](6d88cb4))
* **YouTube - Hide ads:** Prevent app crash if hiding fullscreen ads is not possible ([#2910](#2910)) ([9f50470](9f50470))
* **YouTube Music:** Fix compatibility with latest versions ([#2924](#2924)) ([8378c84](8378c84))
* **YouTube:** Fix video playback by switching to ReVanced GmsCore vendor ([#2907](#2907)) ([33ea122](33ea122))
* **YouTube:** Move setting to correct screen ([a16eda8](a16eda8))

### Features

* **Instagram - Hide timeline ads:** Make compatible with latest versions ([a212f29](a212f29))
* **Mi Fitness:** Add `Force English locale` and `Fix login` patch ([#2734](#2734)) ([7a25791](7a25791))
* **Sync for Lemmy:** Add `Disable ads` patch ([#2872](#2872)) ([0785819](0785819))
* **YouTube - Downloads:** Use external downloader when selecting 'Download' in home feed flyout menu ([#2881](#2881)) ([10afc8c](10afc8c))
* **YouTube - External downloader:** Add ability to use in-app download button ([d900011](d900011))
* **YouTube - Hide layout components:** Filter home/search results by keywords ([#2853](#2853)) ([5916204](5916204))
* **YouTube - Hide Shorts components:** Hide like and dislike buttons ([2df0892](2df0892))
* **YouTube - Hide Shorts components:** Hide sound metadata label ([ea7d1e0](ea7d1e0))
* **YouTube - Hide Shorts components:** Hide title and full video link label ([e7b64e1](e7b64e1))
* **YouTube - Hide Shorts components:** Selectively hide Shorts for home / subscription / search ([#2925](#2925)) ([497c067](497c067))
* **YouTube :** Remove `HDR auto brightness` patch ([#2863](#2863)) ([b4c7bf4](b4c7bf4))
* **YouTube Vanced:** Remove `Hide ads` patch ([87887e4](87887e4))
* **YouTube:** Support version `19.05`, `19.06`, `19.07`, `19.08` and `19.09` ([#2862](#2862)) ([f044dde](f044dde))
E85Addict pushed a commit to E85Addict/revanced-patches that referenced this pull request Mar 27, 2024
# [4.4.0](v4.3.0...v4.4.0) (2024-03-27)

### Bug Fixes

* **TikTok:** Hook application context earlier to prevent crash ([ReVanced#2893](https://github.com/E85Addict/revanced-patches/issues/2893)) ([395ccda](395ccda))
* **YouTube - Client spoof:** Spoof all user agents ([44a8a13](44a8a13))
* **YouTube - Downloads:** Use new task context ([ReVanced#2841](https://github.com/E85Addict/revanced-patches/issues/2841)) ([6d88cb4](6d88cb4))
* **YouTube - Hide ads:** Prevent app crash if hiding fullscreen ads is not possible ([ReVanced#2910](https://github.com/E85Addict/revanced-patches/issues/2910)) ([9f50470](9f50470))
* **YouTube Music:** Fix compatibility with latest versions ([ReVanced#2924](https://github.com/E85Addict/revanced-patches/issues/2924)) ([8378c84](8378c84))
* **YouTube:** Fix video playback by switching to ReVanced GmsCore vendor ([ReVanced#2907](https://github.com/E85Addict/revanced-patches/issues/2907)) ([33ea122](33ea122))
* **YouTube:** Move setting to correct screen ([a16eda8](a16eda8))

### Features

* **Instagram - Hide timeline ads:** Make compatible with latest versions ([a212f29](a212f29))
* **Mi Fitness:** Add `Force English locale` and `Fix login` patch ([ReVanced#2734](https://github.com/E85Addict/revanced-patches/issues/2734)) ([7a25791](7a25791))
* **Sync for Lemmy:** Add `Disable ads` patch ([ReVanced#2872](https://github.com/E85Addict/revanced-patches/issues/2872)) ([0785819](0785819))
* **YouTube - Downloads:** Use external downloader when selecting 'Download' in home feed flyout menu ([ReVanced#2881](https://github.com/E85Addict/revanced-patches/issues/2881)) ([10afc8c](10afc8c))
* **YouTube - External downloader:** Add ability to use in-app download button ([d900011](d900011))
* **YouTube - Hide layout components:** Filter home/search results by keywords ([ReVanced#2853](https://github.com/E85Addict/revanced-patches/issues/2853)) ([5916204](5916204))
* **YouTube - Hide Shorts components:** Hide like and dislike buttons ([2df0892](2df0892))
* **YouTube - Hide Shorts components:** Hide sound metadata label ([ea7d1e0](ea7d1e0))
* **YouTube - Hide Shorts components:** Hide title and full video link label ([e7b64e1](e7b64e1))
* **YouTube - Hide Shorts components:** Selectively hide Shorts for home / subscription / search ([ReVanced#2925](https://github.com/E85Addict/revanced-patches/issues/2925)) ([497c067](497c067))
* **YouTube :** Remove `HDR auto brightness` patch ([ReVanced#2863](https://github.com/E85Addict/revanced-patches/issues/2863)) ([b4c7bf4](b4c7bf4))
* **YouTube Vanced:** Remove `Hide ads` patch ([87887e4](87887e4))
* **YouTube:** Support version `19.05`, `19.06`, `19.07`, `19.08` and `19.09` ([ReVanced#2862](https://github.com/E85Addict/revanced-patches/issues/2862)) ([f044dde](f044dde))

### Performance Improvements

* Personal Logo && Add upstream sync ([5022724](5022724))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants