Lock the screen when an activity or its sub-activity is paused