Bug 959104: Check screen and lock state at the same time.

Check screen and lock state at the same time to determine discovery state to send to hardware.