Loading tests/SurfaceViewBufferTests/src/com/android/test/SurfaceTracingTestBase.kt +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.util.Log import androidx.test.ext.junit.rules.ActivityScenarioRule import com.android.server.wm.flicker.monitor.LayersTraceMonitor import com.android.server.wm.flicker.monitor.withSFTracing import com.android.server.wm.flicker.traces.layers.LayersTrace import com.android.server.wm.traces.parser.layers.LayersTrace import junit.framework.Assert import org.junit.After import org.junit.Before Loading tests/TaskOrganizerTest/src/com/android/test/taskembed/ResizeTasksSyncTest.kt +7 −11 Original line number Diff line number Diff line Loading @@ -77,17 +77,13 @@ class ResizeTasksSyncTest { } // find the frame which match resized buffer size. var frame: Long = -1 loop@ for (trace in trace.entries) { for (layer in trace.flattenedLayers) { if (layer.proto.activeBuffer != null && layer.proto.activeBuffer.width == firstBounds.width() && layer.proto.activeBuffer.height == firstBounds.height()) { frame = layer.proto.currFrame break@loop } } } val frame = trace.entries.flatMap { it.flattenedLayers } .firstOrNull { layer -> !layer.isActiveBufferEmpty && layer.activeBuffer?.width == firstBounds.width() && layer.activeBuffer?.height == firstBounds.height() }?.currFrame ?: -1 assertNotEquals(-1, frame) // layer bounds should be related to parent surfaceview. secondBounds.offsetTo(0, 0) Loading Loading
tests/SurfaceViewBufferTests/src/com/android/test/SurfaceTracingTestBase.kt +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.util.Log import androidx.test.ext.junit.rules.ActivityScenarioRule import com.android.server.wm.flicker.monitor.LayersTraceMonitor import com.android.server.wm.flicker.monitor.withSFTracing import com.android.server.wm.flicker.traces.layers.LayersTrace import com.android.server.wm.traces.parser.layers.LayersTrace import junit.framework.Assert import org.junit.After import org.junit.Before Loading
tests/TaskOrganizerTest/src/com/android/test/taskembed/ResizeTasksSyncTest.kt +7 −11 Original line number Diff line number Diff line Loading @@ -77,17 +77,13 @@ class ResizeTasksSyncTest { } // find the frame which match resized buffer size. var frame: Long = -1 loop@ for (trace in trace.entries) { for (layer in trace.flattenedLayers) { if (layer.proto.activeBuffer != null && layer.proto.activeBuffer.width == firstBounds.width() && layer.proto.activeBuffer.height == firstBounds.height()) { frame = layer.proto.currFrame break@loop } } } val frame = trace.entries.flatMap { it.flattenedLayers } .firstOrNull { layer -> !layer.isActiveBufferEmpty && layer.activeBuffer?.width == firstBounds.width() && layer.activeBuffer?.height == firstBounds.height() }?.currFrame ?: -1 assertNotEquals(-1, frame) // layer bounds should be related to parent surfaceview. secondBounds.offsetTo(0, 0) Loading