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

Commit ea6aec47 authored by Hiroki Sato's avatar Hiroki Sato
Browse files

Disable Immersive Confirmation Dialog in FullScreenMagnificationMouseFollowingTest

In this test, an activity is made immersive fullscreen so that the
entire screen is accounted for magnification.
Making an activity immersive may trigger showing an immersive
confirmation dialog.
This change disables showing the dialog to stabilize the test.

Bug: 361817142
Test: FullScreenMagnificationMouseFollowingTest
Flag: com.android.server.accessibility.enable_magnification_follows_mouse_with_pointer_motion_filter
Change-Id: I4caebaebf38d90316a1980669be2e5e0705bc1e5
parent d0dba9b0
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.os.OutcomeReceiver
import android.platform.test.annotations.RequiresFlagsEnabled
import android.platform.test.flag.junit.CheckFlagsRule
import android.platform.test.flag.junit.DeviceFlagsValueProvider
import android.provider.Settings
import android.testing.PollingCheck
import android.view.Display
import android.view.InputDevice
@@ -42,6 +43,7 @@ import androidx.lifecycle.Lifecycle
import androidx.test.core.app.ActivityScenario
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.android.compatibility.common.util.SettingsStateChangerRule
import com.android.server.accessibility.Flags
import com.google.common.truth.Truth.assertThat
import java.util.concurrent.CompletableFuture
@@ -73,15 +75,23 @@ class FullScreenMagnificationMouseFollowingTest {
    val checkFlagsRule: CheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule()

    @get:Rule(order = 1)
    val immersiveModeConfirmationDialogSettingsRule =
        SettingsStateChangerRule(
            instrumentation.context,
            Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS,
            "confirmed"
        )

    @get:Rule(order = 2)
    val magnificationAccessibilityServiceRule =
        InstrumentedAccessibilityServiceTestRule<TestMagnificationAccessibilityService>(
            TestMagnificationAccessibilityService::class.java, false
        )

    @get:Rule(order = 2)
    @get:Rule(order = 3)
    val desktopMouseRule = DesktopMouseTestRule()

    @get:Rule(order = 3)
    @get:Rule(order = 4)
    val a11yDumpRule: AccessibilityDumpOnFailureRule = AccessibilityDumpOnFailureRule()

    private lateinit var service: TestMagnificationAccessibilityService