Skip to content

Commit

Permalink
Merge pull request #5283 from urlordjames/brightfix
Browse files Browse the repository at this point in the history
disable restoring brightness if brightness gesture is disabled
  • Loading branch information
Redirion authored Dec 29, 2020
2 parents 7153506 + d45ce19 commit 137fbb3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,10 @@ private void setupBrightness() {
// Apply system brightness when the player is not in fullscreen
restoreDefaultBrightness();
} else {
// Do not restore if user has disabled brightness gesture
if (!PlayerHelper.isBrightnessGestureEnabled(activity)) {
return;
}
// Restore already saved brightness level
final float brightnessLevel = PlayerHelper.getScreenBrightness(activity);
if (brightnessLevel == lp.screenBrightness) {
Expand Down

0 comments on commit 137fbb3

Please sign in to comment.