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

Commit daa24771 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add CheckFlagsRule to tests with `@RequiresFlags[Enabled|Disabled]`" into main

parents 4ce3651f 9abadedb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ import android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_HARDWARE_CONFI
import android.hardware.devicestate.DeviceStateManager
import android.platform.test.annotations.RequiresFlagsDisabled
import android.platform.test.annotations.RequiresFlagsEnabled
import android.platform.test.flag.junit.CheckFlagsRule
import android.platform.test.flag.junit.DeviceFlagsValueProvider
import android.provider.Settings.Secure.DEVICE_STATE_ROTATION_KEY_FOLDED
import android.provider.Settings.Secure.DEVICE_STATE_ROTATION_KEY_HALF_FOLDED
import android.provider.Settings.Secure.DEVICE_STATE_ROTATION_KEY_REAR_DISPLAY
@@ -81,6 +83,9 @@ private val DEVICE_STATE_REAR_DISPLAY = DeviceState(
@RunWith(AndroidJUnit4::class)
class PostureDeviceStateConverterTest {

    @get:Rule
    val checkFlagsRule: CheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule()

    @get:Rule val expect: Expect = Expect.create()

    @Mock private lateinit var context: Context