Merge "Move the main thread check to the appropriate place." into honeycomb