Merge "Respect user leaving when pausing activity by sleeping" into main