Adding log / workaround for flaky testScreenCaptureDisabled test
***
This is picked from master branch and fixed the flakiness of the CTS
test.
***
1. We did add log previously, but we dump the log before
starting the activity. Break down the test into multi steps so that
we can now dump the log right after the activity is started.
And We also dump activity now.
2. The package will be restarted when its instrumentation is ran, that
means the activity launched will be killed when the test to verify
capiblity of taking screenshot. Removed ScreenCaptureDisabledActivity
and reuse SimpleActivity in CtsSimpleApp package instead.
3. Also, try to give another shot after 5 second if the screen
capture still working. This can check whether the flakiness is
caused by insufficient delay.
Bug: 31509470
Change-Id: I08f9c6a764bd7fc022f866b0b405864242575e6e
(cherry picked from commit c598218f80e43220a271bd7045b930b49463cdc7)
5 files changed