On Android N running under the instrumentation uiautomator appears to have
trouble retrieving the root node for the home screen of google slides. Therefore
we open the navigation drawer via a swipe which allows the node to be found again.
The latest version of uiautomator2 seems to have an issue with google slides not
being able to interact with any elements on the slide therefore we are using a
slightly older version which doesn't have this issue.
Certain configurations of this workload requires root and therefore on some
android devices, this will prompt to grant the app su permissions by default. To
ensure this does not interfere with the run, ensure that either, re-request
permission after reinstall/upgrade is not selected or grant access by default.
Using the `android` command to create a new project has been deprecated in favour
of using Android Studio. To avoid this constraint a template project has been added
and this is simply duplicated with the relevant files populated when creating a new
project.
Uiautomator1 has been deprecated, therefore the uiautomation base classes have
been upgraded to use uiautomator2 and the new gradle build system.
Altered to retrieve `package_name` rather than `package` as per the previous commit.
The new method of using uiautomation 2 is by using instrumented apk files rather
than JAR files. This commit updates the base workload has been updated to
install/uninstall the new uiautomation APK files and to invoke the relevant
instrumentation.
When moving to Uiautomation 2, tests are now complied into apk files rather than
jar files. To avoid conflicts with regular workload apks a new resource type is
added to retrieve the test files which will be renamed to have the extension
.uiautoapk
A force flag has been added to the `install_apk` method which
ignores the check that the specified file is an apk. This is to support
the new UiAutomation Apk which have been given the extention .uiautoapk.
Adds a method to determine the appropriate method of triggering a media refresh
of a given list of file based on the devices android version and root status. If
a device is running android marshmallow and below or has root, trigger a refresh
of the files containing folder otherwise trigger a refresh of each individual
file.
In android N it is no longer allowed to trigger a media refresh of a directory
without root, therefore this method has been added to trigger a refresh of an
individual file.
Previously AndroidPerfWorkload broadcast media mounted unconditionally
inside push_assets and delete_assets. This change makes it so the
broadcast only happens if something was actually pushed/needs to be
delete.