mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 16:40:32 +00:00
Get brightness from settings if screenBrightness is set to auto
This commit is contained in:
parent
69934dee52
commit
e3a891688b
@ -910,7 +910,11 @@ public final class MainVideoPlayer extends AppCompatActivity
|
|||||||
volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized));
|
volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized));
|
||||||
}
|
}
|
||||||
|
|
||||||
final float screenBrightness = getWindow().getAttributes().screenBrightness;
|
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));
|
brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness));
|
||||||
|
|
||||||
if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() ["
|
if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() ["
|
||||||
|
Loading…
Reference in New Issue
Block a user