1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-05 18:31:12 +01:00

PCMark: Updating to handle new Android 10 permission warnings

Android 10 has introduced a new permission warning and a
seperate warning about the APK being built for an older version
of the Android OS. Have added two checks to accept these
permissions and continue with the workload and the given APK
rather than attempting to update.
This commit is contained in:
scojac01 2019-11-28 15:31:20 +00:00 committed by Marc Bonnici
parent 683eec2377
commit da0ceab027
2 changed files with 17 additions and 0 deletions

View File

@ -47,6 +47,7 @@ public class UiAutomation extends BaseUiAutomation {
@Test
public void setup() throws Exception{
dismissAndroidVersionPopup();
clearPopups();
setScreenOrientation(ScreenOrientation.PORTRAIT);
loadBenchmarks();
installBenchmark();
@ -62,6 +63,22 @@ public class UiAutomation extends BaseUiAutomation {
unsetScreenOrientation();
}
private void clearPopups() throws Exception{
UiObject permiss =
mDevice.findObject(new UiSelector().text("Continue"));
if (permiss.exists()){
permiss.click();
}
UiObject compat =
mDevice.findObject(new UiSelector().text("OK"));
if (compat.exists()){
compat.click();
if (compat.exists()){
compat.click();
}
}
}
//Swipe to benchmarks and back to initialise the app correctly
private void loadBenchmarks() throws Exception {
UiObject title =