Fix flaky test caused by Uninstall activity

The uninstall operation will trigger a system dialog. The test
can't monitor the activity belonging to other process. The only we can
do is to scan the whole screen 1 time 1 second until either the
expected UI object is found or timeout that is 30 seconds.

This patch uses
* UiDevice.wakeUp to power on.
* UiDevice.pressMenu to unlock keyguard
* UiDevice.pressBack to dismiss other system alert window
* UiDevice.pressHome to back to home screen
* UiDevice.waitForIdle

Fixes: 233004981
Test: atest CtsPackageUninstallTestCases
    ab/I41700010054430509
Merged-In: Iba9cf4272d55ce74fd5c7dfc2125172c8337d794
Change-Id: Iba9cf4272d55ce74fd5c7dfc2125172c8337d794
1 file changed