Improvements on ResumeOnRebootHostTest

Such as:
- Improved logging
- Created constants for the hard-coded sleep calls.
- Check if main user is null

Notice that the test is still failing, but at least now the message
is cleaner:

arm64-v8a CtsResumeOnRebootHostTestCases (1 Test)
[1/1] android.appsecurity.cts.ResumeOnRebootHostTest#resumeOnReboot_TwoUsers_SingleUserUnlock_Success: FAILED (05m56.034s)

STACKTRACE:
java.lang.AssertionError: Current user (0) is not 16 after switch

And the real reason is in the logs:

07-29 10:57:42 V/NativeDevice: am switch-user -w 16 on 21151FDEE0036E returned Error: UserSwitchabilityResult=4

Test: atest android.appsecurity.cts.ResumeOnRebootHostTest#resumeOnReboot_TwoUsers_SingleUserUnlock_Success
Bug: 380907032
Bug: 376095626
Bug: 420640007
Bug: 433847650
Bug: 434814918
Flag: TEST_ONLY

Change-Id: I1a78d977c90a118d0d7b89c5a9810af20aa2c108
5 files changed