Fix null pointer exception on bubbles test
When no bubbles exist the following error occurs: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference 07-28 04:11:01.355 1328 1368 E FLICKER : at com.android.wm.shell.flicker.bubble.MultiBubblesScreen$transition$1$2.invoke(MultiBubblesScreen.kt:79) Bug: 240639586 Test: atest WMShellFlickerTests Change-Id: I3ef42b65747aff5a4b4da7fa737efabbaba804fc
This commit is contained in:
@@ -75,7 +75,7 @@ open class MultiBubblesScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen
|
||||
Until.findObjects(
|
||||
By.res(SYSTEM_UI_PACKAGE, BUBBLE_RES_NAME)
|
||||
), FIND_OBJECT_TIMEOUT
|
||||
)
|
||||
) ?: error("No bubbles found")
|
||||
for (entry in bubbles) {
|
||||
entry?.run { entry.click() } ?: error("Bubble not found")
|
||||
SystemClock.sleep(1000)
|
||||
|
||||
Reference in New Issue
Block a user