Set canTurnScreenOn to false for any window with flag.

There are cases where the window has the flag TURN_SCREEN_ON but
the other checks aren't satisfied. In those cases, canTurnScreenOn
will still be true allowing another relayout to turn the screen on.
Instead, set canTurnScreenOn flag to false if any window has the
flag TURN_SCREEN_ON, regardless if the other conditions are met.

The previous fix If8ff9ba1afb1f7f9632e8c911ed475aed531b880 broke
the testTurnScreenOnActivity_withRelayout test so this is a more
correct solution.

Change-Id: I3fa6285cd5f246e96f9034a7af76b8828e16c15d
Fixes: 74086704
Test: testTurnScreenOnActivity_withRelayout
1 file changed