Timeout to ensure user-switching dialog is closed

In the event of user-switch invoked by a remote device admin call,
the window manager does not make window-shown callbacks when the
screen is off. Add a timeout to continue the user switch in case
the callback doesn't come through.

This fixes a stuck "Switching to user.." dialog when a profile
owner requests a user wipe.

Bug: 19275716
Change-Id: I3a51bbaaf3d9ac6c006464360f1146b2499d205b
1 file changed