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

Commit 2df0c41a authored by Lyn's avatar Lyn Committed by Lyn Han
Browse files

Turn off cooldown suppression for wm scenario tests

When cooldown is enabled, heads up notifications are not shown for the
first two minutes after phone reboot, which breaks wm tests that
expect notifications to show up for testing.

Fixes: 330177024

Test: atest WMShellFlickerServicePlatinumTests:com.android.wm.shell.flicker.service.splitscreen.platinum.EnterSplitScreenByDragFromNotificationGesturalNavLandscape#enterSplitScreenByDragFromNotification
atest WMShellFlickerServicePlatinumTests:com.android.wm.shell.flicker.service.splitscreen.platinum.EnterSplitScreenByDragFromNotificationGesturalNavPortrait#enterSplitScreenByDragFromNotification

Change-Id: Ibd81dbe176fde66f241483b98ac6a2716c0f91ad
parent f41d78cf
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.tools.traces.parsers.WindowManagerStateHelper
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.server.wm.flicker.helpers.MultiWindowUtils
import com.android.wm.shell.flicker.service.common.Utils
import com.android.wm.shell.flicker.utils.SplitScreenUtils
import org.junit.After
@@ -51,6 +52,10 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
    fun setup() {
        Assume.assumeTrue(tapl.isTablet)

        MultiWindowUtils.executeShellCommand(
                instrumentation,
                "settings put system notification_cooldown_enabled 0"
        )
        // Send a notification
        sendNotificationApp.launchViaIntent(wmHelper)
        sendNotificationApp.postNotification(wmHelper)
@@ -74,5 +79,10 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
        primaryApp.exit(wmHelper)
        secondaryApp.exit(wmHelper)
        sendNotificationApp.exit(wmHelper)

        MultiWindowUtils.executeShellCommand(
                instrumentation,
                "settings reset system notification_cooldown_enabled"
        )
    }
}