Wake up dream after resuming the moving to front task

Otherwise an activity with turn-screen-on flag cannot take effect
and receive new intent when launching it under dreaming. It will
become normal after the second try.

Because currentLaunchCanTurnScreenOn will be false after relayout
(WS#prepareWindowToDisplayDuringRelayout), then canTurnScreenOn()
will be false before calling resumeTargetRootTaskIfNeeded(), then
wakeUp is not called so the screen doesn't turn on and the dream
activity is still on top.

Fixes: 257533814
Test: ActivityStarterTests#testRecycleTaskWakeUpWhenDreaming
Change-Id: I457a7104068a57b010507a776094b2f354b6450a
2 files changed