Merge "Wait for home screen state before dismissing dialogs" am: 3e9b35e828 am: d1f6a9ad60

Original change: https://android-review.googlesource.com/c/platform/cts/+/1456395

Change-Id: If91157df9cb4ec19aed72ebff130cb349ebbdbde