mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 07:46:55 +00:00
Merge "Improving diags for containers disappearing while getting children" into sc-v2-dev am: 497a6ad826
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15602554 Change-Id: I5231bf1ca4f01da14aa73b19c19b724a0eb446d6
This commit is contained in:
committed by
Automerger Merge Worker
commit
05e0d86c73
@@ -1033,6 +1033,15 @@ public final class LauncherInstrumentation {
|
||||
}
|
||||
}
|
||||
|
||||
List<UiObject2> getChildren(UiObject2 container) {
|
||||
try {
|
||||
return container.getChildren();
|
||||
} catch (StaleObjectException e) {
|
||||
fail("The container disappeared from screen");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasLauncherObject(String resId) {
|
||||
return mDevice.hasObject(getLauncherObjectSelector(resId));
|
||||
}
|
||||
|
||||
@@ -116,9 +116,9 @@ public final class Widgets extends LauncherInstrumentation.VisibleContainer {
|
||||
"widget_preview");
|
||||
int i = 0;
|
||||
for (; ; ) {
|
||||
final Collection<UiObject2> tableRows = widgetsContainer.getChildren();
|
||||
final Collection<UiObject2> tableRows = mLauncher.getChildren(widgetsContainer);
|
||||
for (UiObject2 row : tableRows) {
|
||||
final Collection<UiObject2> widgetCells = row.getChildren();
|
||||
final Collection<UiObject2> widgetCells = mLauncher.getChildren(row);
|
||||
for (UiObject2 widget : widgetCells) {
|
||||
final UiObject2 label = mLauncher.findObjectInContainer(widget,
|
||||
labelSelector);
|
||||
|
||||
Reference in New Issue
Block a user