Merge "Fix overview actions tapl test failure" into tm-qpr-dev

This commit is contained in:
Tracy Zhou
2022-08-12 20:20:45 +00:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 1 deletions

View File

@@ -1123,6 +1123,16 @@ public final class LauncherInstrumentation {
return object;
}
@Nullable
UiObject2 findObjectInContainer(UiObject2 container, String resName) {
try {
return container.findObject(getLauncherObjectSelector(resName));
} catch (StaleObjectException e) {
fail("The container disappeared from screen");
return null;
}
}
@Nullable
UiObject2 findObjectInContainer(UiObject2 container, BySelector selector) {
try {

View File

@@ -182,6 +182,6 @@ public final class OverviewTask {
}
boolean isTaskSplit() {
return mTask.hasObject(By.res("bottomright_snapshot"));
return mLauncher.findObjectInContainer(mTask.getParent(), "bottomright_snapshot") != null;
}
}