Fix screen timeout determination for starting dream.

It turns out OFF_BECAUSE_OF_TIMEOUT is not the best indicator
of actual screen timeout.

For example, it is the reason passed down when acquiring a wake lock.
This was causing us to launch Dreams in the wrong situations, and
deadlocking on calls to WindowManager.

This fix simply adds an additional check ensuring the intention is to
turn the screen off.

Change-Id: If8adff446b5b1fcb19424b45878b75bfd0552b90
1 file changed