diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 31f7dd74a..3340f1107 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -909,6 +909,18 @@ public final class MainVideoPlayer extends AppCompatActivity final float currentVolumeNormalized = (float) getAudioReactor().getVolume() / getAudioReactor().getMaxVolume(); volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized)); } + + float screenBrightness = getWindow().getAttributes().screenBrightness; + if (screenBrightness < 0) + screenBrightness = Settings.System.getInt(getContentResolver(), + Settings.System.SCREEN_BRIGHTNESS, 0) / 255.0f; + + brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness)); + + if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() [" + + volumeProgressBar.getProgress() + "] " + + "brightnessProgressBar.getProgress() [" + + brightnessProgressBar.getProgress() + "]"); } @Override