Skip to content

Commit 37313fb

Browse files
committed
android: fix transparency and noise cancellation flags
huh... was it always like this?
1 parent d9469c2 commit 37313fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

android/app/src/main/java/me/kavishdevar/librepods/screens/PressAndHoldSettingsScreen.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ fun LongPress(navController: NavController, name: String) {
110110
if (modesByte != null) {
111111
Log.d("PressAndHoldSettingsScreen", "Current modes state: ${modesByte.toString(2)}")
112112
Log.d("PressAndHoldSettingsScreen", "Off mode: ${(modesByte and 0x01) != 0.toByte()}")
113-
Log.d("PressAndHoldSettingsScreen", "Transparency mode: ${(modesByte and 0x02) != 0.toByte()}")
114-
Log.d("PressAndHoldSettingsScreen", "Noise Cancellation mode: ${(modesByte and 0x04) != 0.toByte()}")
113+
Log.d("PressAndHoldSettingsScreen", "Transparency mode: ${(modesByte and 0x04) != 0.toByte()}")
114+
Log.d("PressAndHoldSettingsScreen", "Noise Cancellation mode: ${(modesByte and 0x02) != 0.toByte()}")
115115
Log.d("PressAndHoldSettingsScreen", "Adaptive mode: ${(modesByte and 0x08) != 0.toByte()}")
116116
}
117117
val context = LocalContext.current
@@ -222,9 +222,9 @@ fun LongPress(navController: NavController, name: String) {
222222
name = stringResource(R.string.transparency),
223223
description = "Lets in external sounds",
224224
iconRes = R.drawable.transparency,
225-
selected = (currentByte and 0x02) != 0,
225+
selected = (currentByte and 0x04) != 0,
226226
onClick = {
227-
val bit = 0x02
227+
val bit = 0x04
228228
val newValue = if ((currentByte and bit) != 0) {
229229
val temp = currentByte and bit.inv()
230230
if (countEnabledModes(temp) >= 2) temp else currentByte
@@ -268,9 +268,9 @@ fun LongPress(navController: NavController, name: String) {
268268
name = stringResource(R.string.noise_cancellation),
269269
description = "Blocks out external sounds",
270270
iconRes = R.drawable.noise_cancellation,
271-
selected = (currentByte and 0x04) != 0,
271+
selected = (currentByte and 0x02) != 0,
272272
onClick = {
273-
val bit = 0x04
273+
val bit = 0x02
274274
val newValue = if ((currentByte and bit) != 0) {
275275
val temp = currentByte and bit.inv()
276276
if (countEnabledModes(temp) >= 2) temp else currentByte

0 commit comments

Comments
 (0)