Replace waitForBroadcastIdle with explicit polling

Because removeUserState() is executed in a new thread, the current function cannot accurately determine whether the user restrictions is removed.
So replace waitForBroadcastIdle() on the host side with polling on the device side to ensure that the user restrictions has been removed

Bug: 162454669
Change-Id: I3097daa7775354242cfc066b81fa05c16a114091
2 files changed