fix removeUser failure due to slow broadcast processing

Removing the secondary user may not finish within the timeout of executeShellCommand() on low-end devices. It's because USER_STOPPING and/or ACTION_SHUTDOWN broadcasts aren't completed due to the other broadcast requests.

This CL fixes the issue by waiting for broadcast idle before removing user.

Bug:157813754
Test: run cts -m CtsMediaHostTestCases

Signed-off-by: qianyou <qianyou@xiaomi.com>
Change-Id: I4a9e1922e139771775a223052cc9e4a93ebe9212
(cherry picked from commit cf349d6665a63b96b379bac1a7a3269286a06856)
1 file changed