Skip to content

Tsa/software brightness auto#747

Open
apollotsantos wants to merge 3 commits into
AndreyPavlenko:masterfrom
apollotsantos:tsa/software-brightness-auto
Open

Tsa/software brightness auto#747
apollotsantos wants to merge 3 commits into
AndreyPavlenko:masterfrom
apollotsantos:tsa/software-brightness-auto

Conversation

@apollotsantos
Copy link
Copy Markdown
Contributor

@apollotsantos apollotsantos commented May 4, 2026

This PR replaces the old video brightness handling with a software dimming overlay.

The previous implementation attempted to write Android's system SCREEN_BRIGHTNESS setting while video mode was active. That requires WRITE_SETTINGS, can prompt users to grant a broad system permission, and does not reliably affect Android Auto/DHU projection surfaces where the app cannot control the head unit display brightness.

What changed:

  • Stop requesting/managing system brightness writes from MainActivityDelegate.
  • Track video brightness as an app-local value and apply it to the active video surface.
  • Add a black overlay to VideoView and adjust its alpha to dim video playback.
  • Support two-finger vertical drag on the video surface to adjust dimming.
  • Add a YouTube/WebView overlay path so inline and fullscreen YouTube playback can be dimmed too.
  • Update the brightness setting text to describe software dimming instead of hardware brightness control.

Validation:

  • Manual Android Auto/DHU testing confirmed the brightness control works.

private float brightnessStartX;
private float brightnessStartY;
private int brightnessStartValue;
private int brightnessGestureValue;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Gesture detection is already implemented in ControlPanelView.onScroll()

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.

2 participants