Use post-execution state for ActivityResultItem

onActivityResult was called before onStart when resuming an activity
from STOPPED state.

Ensure the onActivityResult callback to be called before onResume.
But we only fix this after Android S to avoid some app compatibility
issues.

Bug: 78294732
Bug: 130178098
Test: atest ActivityLifecycleTests
Change-Id: I9ff060ff26d3fc517aae0a094fc041887326a963
1 file changed