Use Lifecycle Callbacks Instead of SplitInfo...

...to Retrieve the Secondary Activity

Currently, the secondary activity in the CTS tests
is always a TestActivityWithId and is retrieved
from the split info callback that occurs after the
secondary activity is launched. The secondary
activity is found within the split info callback
using the activity id passed in as an intent extra.
However, [1] ensures that a split info callback
with the newly launched activity reaches the
application before the newly launched activity's
onCreate() callback. As a result, the test
infrastructure is trying to find the secondary
activity in the split info before the secondary
activity id has been set in onCreate(). This CL
fixes that by retrieving the secondary activity
from a lifecycle callback rather than the split
info.

[1] If69c077db8ca390d41446e1329a448b3dd074293

Bug: b/218791665 b/216685227
Test: atest ActivityEmbeddingLaunchTests
Change-Id: I3b23d541f85d393dd02d0aebdac0da559a160b73
6 files changed