mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix: show every held volume step in Steam's volume slider
This commit is contained in:
1 parent
8164f9fae1
commit
3fd9662161
4 files changed
+75
-14
No files matched your search
@@ -66,6 +66,15 @@ class DeviceControlsComponentTest {
|
||||
assertEquals(3, audio.getStreamVolume(AudioManager.STREAM_MUSIC))
|
||||
}
|
||||
|
||||
@Test fun everyVolumeStepIsPublishedWithoutWaitingForThePoll() {
|
||||
for (level in 2..5) {
|
||||
audio.setStreamVolume(AudioManager.STREAM_MUSIC, level, 0)
|
||||
context.sendBroadcast(android.content.Intent("android.media.VOLUME_CHANGED_ACTION"))
|
||||
shadowOf(Looper.getMainLooper()).idle()
|
||||
assertEquals(level.toString(), File(directory, "volume.state").readText().split(" ").first())
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun deniedBrightnessDoesNotOpenSettingsOrReplayAnOldSliderValueAfterPermission() {
|
||||
WriteSettingsShadow.writable = false
|
||||
request("brightness", "0.75")
|
||||
|
||||
Reference in new issue
Block a user