461d4bad9d
We must wait for the ANRd process to be fully killed. If we simply click on "close" button on the dialog, this is not sufficient. The system would still be processing ANR and trying to kill the process. This killing action will therefore impact the next 'am start' command. The second activity will never be launched. In this CL, add a wait by polling the 'ApplicationExitInfo' lists before and after the 'close' button is clicked. Bug: 196111779 Test: atest InputTests:AnrTest Change-Id: I35e8f4ba302d0f1ed4a03be2257541a4e9a638f4