Skip to content

Commit 802b380

Browse files
Paige McAuliffecopybara-androidxtest
authored andcommitted
Add closed mode to RequiresDeviceModeFilter
PiperOrigin-RevId: 533575211
1 parent 9b982db commit 802b380

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

espresso/device/java/androidx/test/espresso/device/filter/RequiresDeviceModeFilter.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ internal class RequiresDeviceModeFilter() : AbstractFilter() {
7272
supportedModes.add(DeviceMode.TABLETOP)
7373
supportedModes.add(DeviceMode.BOOK)
7474
supportedModes.add(DeviceMode.FLAT)
75+
supportedModes.add(DeviceMode.CLOSED)
7576
}
7677
} else { // API 32+
7778
// Example output on a foldable device:
@@ -88,6 +89,9 @@ internal class RequiresDeviceModeFilter() : AbstractFilter() {
8889
if (modes.contains("OPENED")) {
8990
supportedModes.add(DeviceMode.FLAT)
9091
}
92+
if (modes.contains("CLOSED")) {
93+
supportedModes.add(DeviceMode.CLOSED)
94+
}
9195
}
9296
return supportedModes
9397
}

0 commit comments

Comments
 (0)