Wake up device before sending back event

Or it would introduced unnecessary ANR due to there is no
focused window when screen off.

Also reduce the test time of unnecessary waiting.

Bug: 201548568
Test: atest ActivityVisibilityTests
Change-Id: I3081413713a73cb7565cf73cfcc7cee58b8fbecd
2 files changed