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