FgsBgStartTest: Wait for the startForeground from test app

ProcState of the test app could be changed to FGS before calling
startForeground(), while if subsequently it's told to stop,
the call to startForeground could crash the test app.

Bug: 162450085
Test: atest CtsAppTestCases
Change-Id: I76e2115292258014dd0e9775b559696795599b37
1 file changed