Fix DeviceOwnerTest test fail by switch-user takes long times

During the case testing period, it was necessary to switch the system to the main user in order to successfully delete sub users. Due to the command being issued too quickly, the last switch command did not.
Switching sub users upon completion resulted in a failed switch, making it impossible to delete sub users.
The process of switching users is a time-consuming operation, and after issuing the switch command, it is necessary to delay the process appropriately until it is completed.

Bug: 287592419
Test: run cts CtsDevicePolicyManagerTestCases
(cherry picked from https://android-review.googlesource.com/q/commit:72acc16ca05d56ab522f9ce922fbc1140f2b96d0)
Merged-In: Ida3e673a5597e99f9bc0f96893fc6c872a37cfa5
Change-Id: Ida3e673a5597e99f9bc0f96893fc6c872a37cfa5
1 file changed