Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +2 −2 Original line number Diff line number Diff line Loading @@ -114,14 +114,14 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisibleByDrag( ) { assertLayers { if (isShellTransitionsEnabled) { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component), isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } else { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component), isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromNotification.kt +1 −8 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.WindowManagerPolicyConstants import androidx.test.filters.RequiresDevice import androidx.test.uiautomator.By import androidx.test.uiautomator.Until import com.android.server.wm.flicker.FlickerParametersRunnerFactory import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory Loading Loading @@ -73,12 +71,7 @@ class EnterSplitScreenByDragFromNotification( setup { // Send a notification sendNotificationApp.launchViaIntent(wmHelper) val sendNotification = device.wait( Until.findObject(By.text("Send Notification")), SplitScreenUtils.TIMEOUT_MS ) sendNotification?.click() ?: error("Send notification button not found") sendNotificationApp.postNotification(wmHelper) tapl.goHome() primaryApp.launchViaIntent(wmHelper) } Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/SplitScreenUtils.kt +4 −4 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelpe import com.android.wm.shell.flicker.SYSTEM_UI_PACKAGE_NAME internal object SplitScreenUtils { internal const val TIMEOUT_MS = 3_000L private const val TIMEOUT_MS = 3_000L private const val DRAG_DURATION_MS = 1_000L private const val NOTIFICATION_SCROLLER = "notification_stack_scroller" private const val DIVIDER_BAR = "docked_divider_handle" Loading @@ -52,7 +52,7 @@ internal object SplitScreenUtils { private val notificationScrollerSelector: BySelector get() = By.res(SYSTEM_UI_PACKAGE_NAME, NOTIFICATION_SCROLLER) private val notificationContentSelector: BySelector get() = By.text("Notification content") get() = By.text("Flicker Test Notification") private val dividerBarSelector: BySelector get() = By.res(SYSTEM_UI_PACKAGE_NAME, DIVIDER_BAR) Loading Loading @@ -140,14 +140,14 @@ internal object SplitScreenUtils { // Pull down the notifications device.swipe( displayBounds.centerX(), 5, displayBounds.centerX(), displayBounds.bottom, 20 /* steps */ displayBounds.centerX(), displayBounds.bottom, 50 /* steps */ ) SystemClock.sleep(TIMEOUT_MS) // Find the target notification val notificationScroller = device.wait( Until.findObject(notificationScrollerSelector), TIMEOUT_MS ) ) ?: error ("Unable to find view $notificationScrollerSelector") var notificationContent = notificationScroller.findObject(notificationContentSelector) while (notificationContent == null) { Loading tests/FlickerTests/test-apps/flickerapp/res/layout/activity_notification.xmldeleted 100644 → 0 +0 −30 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2022 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@android:color/black"> <Button android:id="@+id/button_send_notification" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="Send Notification" /> </RelativeLayout> tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/ActivityOptions.java +0 −6 Original line number Diff line number Diff line Loading @@ -177,12 +177,6 @@ public class ActivityOptions { } } public static class SendNotificationActivity { public static final String LABEL = "SendNotificationActivity"; public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, FLICKER_APP_PACKAGE + ".SendNotificationActivity"); } public static class Bubbles { public static class LaunchBubble { public static final String LABEL = "LaunchBubbleActivity"; Loading Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +2 −2 Original line number Diff line number Diff line Loading @@ -114,14 +114,14 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisibleByDrag( ) { assertLayers { if (isShellTransitionsEnabled) { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component), isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } else { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component), isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromNotification.kt +1 −8 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.WindowManagerPolicyConstants import androidx.test.filters.RequiresDevice import androidx.test.uiautomator.By import androidx.test.uiautomator.Until import com.android.server.wm.flicker.FlickerParametersRunnerFactory import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory Loading Loading @@ -73,12 +71,7 @@ class EnterSplitScreenByDragFromNotification( setup { // Send a notification sendNotificationApp.launchViaIntent(wmHelper) val sendNotification = device.wait( Until.findObject(By.text("Send Notification")), SplitScreenUtils.TIMEOUT_MS ) sendNotification?.click() ?: error("Send notification button not found") sendNotificationApp.postNotification(wmHelper) tapl.goHome() primaryApp.launchViaIntent(wmHelper) } Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/SplitScreenUtils.kt +4 −4 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelpe import com.android.wm.shell.flicker.SYSTEM_UI_PACKAGE_NAME internal object SplitScreenUtils { internal const val TIMEOUT_MS = 3_000L private const val TIMEOUT_MS = 3_000L private const val DRAG_DURATION_MS = 1_000L private const val NOTIFICATION_SCROLLER = "notification_stack_scroller" private const val DIVIDER_BAR = "docked_divider_handle" Loading @@ -52,7 +52,7 @@ internal object SplitScreenUtils { private val notificationScrollerSelector: BySelector get() = By.res(SYSTEM_UI_PACKAGE_NAME, NOTIFICATION_SCROLLER) private val notificationContentSelector: BySelector get() = By.text("Notification content") get() = By.text("Flicker Test Notification") private val dividerBarSelector: BySelector get() = By.res(SYSTEM_UI_PACKAGE_NAME, DIVIDER_BAR) Loading Loading @@ -140,14 +140,14 @@ internal object SplitScreenUtils { // Pull down the notifications device.swipe( displayBounds.centerX(), 5, displayBounds.centerX(), displayBounds.bottom, 20 /* steps */ displayBounds.centerX(), displayBounds.bottom, 50 /* steps */ ) SystemClock.sleep(TIMEOUT_MS) // Find the target notification val notificationScroller = device.wait( Until.findObject(notificationScrollerSelector), TIMEOUT_MS ) ) ?: error ("Unable to find view $notificationScrollerSelector") var notificationContent = notificationScroller.findObject(notificationContentSelector) while (notificationContent == null) { Loading
tests/FlickerTests/test-apps/flickerapp/res/layout/activity_notification.xmldeleted 100644 → 0 +0 −30 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2022 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@android:color/black"> <Button android:id="@+id/button_send_notification" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="Send Notification" /> </RelativeLayout>
tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/ActivityOptions.java +0 −6 Original line number Diff line number Diff line Loading @@ -177,12 +177,6 @@ public class ActivityOptions { } } public static class SendNotificationActivity { public static final String LABEL = "SendNotificationActivity"; public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, FLICKER_APP_PACKAGE + ".SendNotificationActivity"); } public static class Bubbles { public static class LaunchBubble { public static final String LABEL = "LaunchBubbleActivity"; Loading