Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5bb5365b authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Allow a drawn reported activity to keep screen brightness

In case if the activity was requested to redraw for config change,
then the draw state becomes DRAW_PENDING (isDrawn() will be false)
but it is still visible on screen.

The firstWindowDrawn is set when the main window of activity is
drawn, and it cleared when the activity is stopped. So it can
keep the state across redraw.

Also simplify the conditions a bit because onScreen already means
mHasSurface==true and isDisplayed()==onScreen&&isDrawn().

Bug: 284917190
Test: Launch an activity which sets screenBrightness and enter
      split screen. After resizing the divider, the screen
      brightness should not be changed.

Change-Id: If31fc3ff492918e6486c0e16ef5ca3edb16b0bea
parent 9a350627
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment