Merge "Wait until the transition completes before checking lifecycle state" into oreo-cts-dev