Merge "waitWithTimeout() needs to check if the result is already available, like waitForActivity() does."