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