Remove the cast and use the override then()

Change-Id: I137961a97c68f628fcc8b945f45665ce81e0e9b2
Test: atest AutoEnterPipFromSplitScreenOnGoToHomeTest
Bug: 301107915
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt
index 03c438f..213d596 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AutoEnterPipFromSplitScreenOnGoToHomeTest.kt
@@ -135,7 +135,7 @@
             if (flicker.scenario.isLandscapeOrSeascapeAtStart) {
                 flicker.assertWmVisibleRegion(pipApp) {
                     // first check against landscape bounds then against portrait bounds
-                    (coversAtMost(displayBounds).then() as RegionTraceSubject).coversAtMost(
+                    coversAtMost(displayBounds).then().coversAtMost(
                         portraitDisplayBounds
                     )
                 }