File tree Expand file tree Collapse file tree
app/src/androidTest/java/org/schabi/newpipe/ui/components/menu Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org.schabi.newpipe.ui.components.menu
22
3+ import android.os.Build
34import androidx.activity.ComponentActivity
45import androidx.compose.runtime.getValue
56import androidx.compose.runtime.mutableStateOf
@@ -69,7 +70,12 @@ class LongPressMenuTest {
6970 // Test rule for restoring device to its starting display size when a test case finishes.
7071 // See https://developer.android.com/training/testing/different-screens/tools#resize-displays.
7172 @get:Rule(order = 2 )
72- val displaySizeRule: DisplaySizeRule = DisplaySizeRule ()
73+ val displaySizeRule: DisplaySizeRule ? =
74+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .N ) {
75+ DisplaySizeRule ()
76+ } else {
77+ null
78+ }
7379
7480 private fun getLongPressable (
7581 title : String = "title",
You can’t perform that action at this time.
0 commit comments