Improved waitForBroadcastIdle() logic on CtsAccountsHostTestCases

It was causing failures when the queue was not idle yet.

Test: atest --iterations 10 android.host.accounts.AccountManagerXUserTest
Bug: 433890267
Flag: TEST_ONLY

Change-Id: I72e23911f62291a9a72f45f729ff1873493a9666
2 files changed