We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 792629a commit 93328d2Copy full SHA for 93328d2
1 file changed
android/app/src/main/java/me/kavishdevar/librepods/screens/AccessibilitySettingsScreen.kt
@@ -818,7 +818,11 @@ private fun parseTransparencySettingsResponse(data: ByteArray): TransparencySett
818
val avg = (leftAmplification + rightAmplification) / 2
819
val amplification = avg.coerceIn(0f, 1f)
820
val diff = rightAmplification - leftAmplification
821
- val balance = (0.5f + diff / (2 * avg)).coerceIn(0f, 1f)
+ val balance = if (avg == 0f) {
822
+ 0.5f
823
+ } else {
824
+ (0.5f + diff / (2 * avg)).coerceIn(0f, 1f)
825
+ }
826
827
return TransparencySettings(
828
enabled = enabled > 0.5f,
0 commit comments