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

Commit 01ee7c7e authored by Ömer Faruk Yılmaz's avatar Ömer Faruk Yılmaz
Browse files

Add CheckFlagsRule to tests with `@RequiresFlags[Enabled|Disabled]`

To enable Global lint CheckFlagsRuleDetector, we need to first fix
(or baseline) all existing errors.

For context on the development of this new lint, see b/430031210.

Bug: 435371380
Test: m .
Flag: EXEMPT test change
Change-Id: I5e162b78e8a09a27bf819e2c08e77a892bcfa175
parent 566af37c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import android.hardware.display.VirtualDisplayConfig
import android.os.UserHandle
import android.platform.test.annotations.EnableFlags
import android.platform.test.annotations.RequiresFlagsEnabled
import android.platform.test.flag.junit.CheckFlagsRule
import android.platform.test.flag.junit.DeviceFlagsValueProvider
import android.testing.TestableLooper
import android.view.View
import android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR
@@ -54,6 +56,7 @@ import com.google.common.truth.Truth.assertWithMessage
import junit.framework.Assert.assertEquals
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
@@ -66,6 +69,7 @@ import org.mockito.MockitoAnnotations
@RunWith(AndroidJUnit4::class)
@TestableLooper.RunWithLooper(setAsMainLooper = true)
class ScreenRecordPermissionDialogDelegateTest : SysuiTestCase() {
    @get:Rule val checkFlagsRule: CheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule()

    @Mock private lateinit var starter: ActivityStarter
    @Mock private lateinit var controller: ScreenRecordUxController