Fix a race conditon in `incident`.

`incident` may exit too early, which leads to data lost. This commit
fixes it.

Bug: 144821874
Test: atest com.android.server.cts.IncidentdTest
Change-Id: Ib73118cb690a8247049b5685ed0b227dad63f752
1 file changed