Merge "Using proc state to determine foreground status."