Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29f622d1 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Replace array for collection

Without transpiling the code to typescript, it is no longer necessary to keep the values as array. instead we can use Collection/List and avoid a lot of conversion

Bug: 311642700
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I43aaf5c793b97bb5b4e8568df99ed4a272e5b07b
parent c7858862
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ class UnlockKeyguardToSplitScreen(override val flicker: LegacyFlickerTest) :
                            subject.name.contains(primaryApp.toLayerName()) && subject.isVisible
                        }
                        .mapNotNull { primaryApp -> primaryApp.layer.visibleRegion }
                        .toTypedArray()

                val primaryAppRegionArea = RegionSubject(primaryAppRegions, it.timestamp)
                it.visibleRegion(secondaryApp).notOverlaps(primaryAppRegionArea.region)
+0 −1
Original line number Diff line number Diff line
@@ -85,7 +85,6 @@ class CloseImeOnDismissPopupDialogTest(flicker: LegacyFlickerTest) : BaseTest(fl
                    val visibleAreas =
                        imeSnapshotLayers
                            .mapNotNull { imeSnapshotLayer -> imeSnapshotLayer.layer.visibleRegion }
                            .toTypedArray()
                    val imeVisibleRegion = RegionSubject(visibleAreas, timestamp)
                    val appVisibleRegion = it.visibleRegion(imeTestApp)
                    if (imeVisibleRegion.region.isNotEmpty) {
+0 −1
Original line number Diff line number Diff line
@@ -281,7 +281,6 @@ fun LegacyFlickerTest.snapshotStartingWindowLayerCoversExactlyOnApp(
            val visibleAreas =
                snapshotLayers
                    .mapNotNull { snapshotLayer -> snapshotLayer.layer.visibleRegion }
                    .toTypedArray()
            val snapshotRegion = RegionSubject(visibleAreas, it.timestamp)
            val appVisibleRegion = it.visibleRegion(component)
            // Verify the size of snapshotRegion covers appVisibleRegion exactly in animation.