Fix initial brightness value

This commit is contained in:
Alexey Dubrov 2020-02-16 16:08:53 +03:00
parent ec45d4a729
commit 51f2efd48c
No known key found for this signature in database
GPG Key ID: 4F516863E4371E21
1 changed files with 8 additions and 0 deletions

View File

@ -909,6 +909,14 @@ public final class MainVideoPlayer extends AppCompatActivity
final float currentVolumeNormalized = (float) getAudioReactor().getVolume() / getAudioReactor().getMaxVolume();
volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized));
}
final float screenBrightness = getWindow().getAttributes().screenBrightness;
brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness));
if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() ["
+ volumeProgressBar.getProgress() + "] "
+ "brightnessProgressBar.getProgress() ["
+ brightnessProgressBar.getProgress() + "]");
}
@Override