mono/MonoGame — pull request #990 by Aranda (2012-11-14 17:43:16+00:00)
Title: Android: Fix black screen when turning screen on just after an auto screen off

If the user turns the screen on just after it has automatically turned off, the keyguard will not have had time to activate and the ActionUserPreset intent will not be broadcast. To fix the issue, I added a check for whether the lock is currently active when the screen is turned on and if not re-enable the game related functions.

Reference: http://stackoverflow.com/questions/4260794/how-to-tell-if-device-is-sleeping