android: remove stray eq config in accessibility settings

This commit is contained in:
Kavish Devar
2025-10-26 20:05:00 +05:30
parent 02edb51e41
commit cea09b208a

View File

@@ -431,143 +431,143 @@ fun AccessibilitySettingsScreen(navController: NavController) {
} }
if (!hearingAidEnabled.value&& isSdpOffsetAvailable.value) { if (!hearingAidEnabled.value&& isSdpOffsetAvailable.value) {
Text( // Text(
text = stringResource(R.string.apply_eq_to), // text = stringResource(R.string.apply_eq_to),
style = TextStyle( // style = TextStyle(
fontSize = 14.sp, // fontSize = 14.sp,
fontWeight = FontWeight.Bold, // fontWeight = FontWeight.Bold,
color = textColor.copy(alpha = 0.6f), // color = textColor.copy(alpha = 0.6f),
fontFamily = FontFamily(Font(R.font.sf_pro)) // fontFamily = FontFamily(Font(R.font.sf_pro))
), // ),
modifier = Modifier.padding(8.dp, bottom = 0.dp) // modifier = Modifier.padding(8.dp, bottom = 0.dp)
) // )
Column( // Column(
modifier = Modifier // modifier = Modifier
.fillMaxWidth() // .fillMaxWidth()
.background(backgroundColor, RoundedCornerShape(28.dp)) // .background(backgroundColor, RoundedCornerShape(28.dp))
.padding(vertical = 0.dp) // .padding(vertical = 0.dp)
) { // ) {
val darkModeLocal = isSystemInDarkTheme() // val darkModeLocal = isSystemInDarkTheme()
//
val phoneShape = RoundedCornerShape(topStart = 28.dp, topEnd = 28.dp) // val phoneShape = RoundedCornerShape(topStart = 28.dp, topEnd = 28.dp)
var phoneBackgroundColor by remember { // var phoneBackgroundColor by remember {
mutableStateOf( // mutableStateOf(
if (darkModeLocal) Color( // if (darkModeLocal) Color(
0xFF1C1C1E // 0xFF1C1C1E
) else Color(0xFFFFFFFF) // ) else Color(0xFFFFFFFF)
) // )
} // }
val phoneAnimatedBackgroundColor by animateColorAsState( // val phoneAnimatedBackgroundColor by animateColorAsState(
targetValue = phoneBackgroundColor, // targetValue = phoneBackgroundColor,
animationSpec = tween(durationMillis = 500) // animationSpec = tween(durationMillis = 500)
) // )
//
Row( // Row(
modifier = Modifier // modifier = Modifier
.height(48.dp) // .height(48.dp)
.fillMaxWidth() // .fillMaxWidth()
.background(phoneAnimatedBackgroundColor, phoneShape) // .background(phoneAnimatedBackgroundColor, phoneShape)
.pointerInput(Unit) { // .pointerInput(Unit) {
detectTapGestures( // detectTapGestures(
onPress = { // onPress = {
phoneBackgroundColor = // phoneBackgroundColor =
if (darkModeLocal) Color(0x40888888) else Color(0x40D9D9D9) // if (darkModeLocal) Color(0x40888888) else Color(0x40D9D9D9)
tryAwaitRelease() // tryAwaitRelease()
phoneBackgroundColor = // phoneBackgroundColor =
if (darkModeLocal) Color(0xFF1C1C1E) else Color(0xFFFFFFFF) // if (darkModeLocal) Color(0xFF1C1C1E) else Color(0xFFFFFFFF)
phoneEQEnabled.value = !phoneEQEnabled.value // phoneEQEnabled.value = !phoneEQEnabled.value
} // }
) // )
} // }
.padding(horizontal = 16.dp), // .padding(horizontal = 16.dp),
verticalAlignment = Alignment.CenterVertically // verticalAlignment = Alignment.CenterVertically
) { // ) {
Text( // Text(
stringResource(R.string.phone), // stringResource(R.string.phone),
fontSize = 16.sp, // fontSize = 16.sp,
color = textColor, // color = textColor,
fontFamily = FontFamily(Font(R.font.sf_pro)), // fontFamily = FontFamily(Font(R.font.sf_pro)),
modifier = Modifier.weight(1f) // modifier = Modifier.weight(1f)
) // )
Checkbox( // Checkbox(
checked = phoneEQEnabled.value, // checked = phoneEQEnabled.value,
onCheckedChange = { phoneEQEnabled.value = it }, // onCheckedChange = { phoneEQEnabled.value = it },
colors = CheckboxDefaults.colors().copy( // colors = CheckboxDefaults.colors().copy(
checkedCheckmarkColor = Color(0xFF007AFF), // checkedCheckmarkColor = Color(0xFF007AFF),
uncheckedCheckmarkColor = Color.Transparent, // uncheckedCheckmarkColor = Color.Transparent,
checkedBoxColor = Color.Transparent, // checkedBoxColor = Color.Transparent,
uncheckedBoxColor = Color.Transparent, // uncheckedBoxColor = Color.Transparent,
checkedBorderColor = Color.Transparent, // checkedBorderColor = Color.Transparent,
uncheckedBorderColor = Color.Transparent // uncheckedBorderColor = Color.Transparent
), // ),
modifier = Modifier // modifier = Modifier
.height(24.dp) // .height(24.dp)
.scale(1.5f) // .scale(1.5f)
) // )
} // }
//
HorizontalDivider( // HorizontalDivider(
thickness = 1.dp, // thickness = 1.dp,
color = Color(0x40888888) // color = Color(0x40888888)
) // )
//
val mediaShape = RoundedCornerShape(bottomStart = 28.dp, bottomEnd = 28.dp) // val mediaShape = RoundedCornerShape(bottomStart = 28.dp, bottomEnd = 28.dp)
var mediaBackgroundColor by remember { // var mediaBackgroundColor by remember {
mutableStateOf( // mutableStateOf(
if (darkModeLocal) Color( // if (darkModeLocal) Color(
0xFF1C1C1E // 0xFF1C1C1E
) else Color(0xFFFFFFFF) // ) else Color(0xFFFFFFFF)
) // )
} // }
val mediaAnimatedBackgroundColor by animateColorAsState( // val mediaAnimatedBackgroundColor by animateColorAsState(
targetValue = mediaBackgroundColor, // targetValue = mediaBackgroundColor,
animationSpec = tween(durationMillis = 500) // animationSpec = tween(durationMillis = 500)
) // )
//
Row( // Row(
modifier = Modifier // modifier = Modifier
.height(48.dp) // .height(48.dp)
.fillMaxWidth() // .fillMaxWidth()
.background(mediaAnimatedBackgroundColor, mediaShape) // .background(mediaAnimatedBackgroundColor, mediaShape)
.pointerInput(Unit) { // .pointerInput(Unit) {
detectTapGestures( // detectTapGestures(
onPress = { // onPress = {
mediaBackgroundColor = // mediaBackgroundColor =
if (darkModeLocal) Color(0x40888888) else Color(0x40D9D9D9) // if (darkModeLocal) Color(0x40888888) else Color(0x40D9D9D9)
tryAwaitRelease() // tryAwaitRelease()
mediaBackgroundColor = // mediaBackgroundColor =
if (darkModeLocal) Color(0xFF1C1C1E) else Color(0xFFFFFFFF) // if (darkModeLocal) Color(0xFF1C1C1E) else Color(0xFFFFFFFF)
mediaEQEnabled.value = !mediaEQEnabled.value // mediaEQEnabled.value = !mediaEQEnabled.value
} // }
) // )
} // }
.padding(horizontal = 16.dp), // .padding(horizontal = 16.dp),
verticalAlignment = Alignment.CenterVertically // verticalAlignment = Alignment.CenterVertically
) { // ) {
Text( // Text(
stringResource(R.string.media), // stringResource(R.string.media),
fontSize = 16.sp, // fontSize = 16.sp,
color = textColor, // color = textColor,
fontFamily = FontFamily(Font(R.font.sf_pro)), // fontFamily = FontFamily(Font(R.font.sf_pro)),
modifier = Modifier.weight(1f) // modifier = Modifier.weight(1f)
) // )
Checkbox( // Checkbox(
checked = mediaEQEnabled.value, // checked = mediaEQEnabled.value,
onCheckedChange = { mediaEQEnabled.value = it }, // onCheckedChange = { mediaEQEnabled.value = it },
colors = CheckboxDefaults.colors().copy( // colors = CheckboxDefaults.colors().copy(
checkedCheckmarkColor = Color(0xFF007AFF), // checkedCheckmarkColor = Color(0xFF007AFF),
uncheckedCheckmarkColor = Color.Transparent, // uncheckedCheckmarkColor = Color.Transparent,
checkedBoxColor = Color.Transparent, // checkedBoxColor = Color.Transparent,
uncheckedBoxColor = Color.Transparent, // uncheckedBoxColor = Color.Transparent,
checkedBorderColor = Color.Transparent, // checkedBorderColor = Color.Transparent,
uncheckedBorderColor = Color.Transparent // uncheckedBorderColor = Color.Transparent
), // ),
modifier = Modifier // modifier = Modifier
.height(24.dp) // .height(24.dp)
.scale(1.5f) // .scale(1.5f)
) // )
} // }
} // }
// EQ Settings. Don't seem to have an effect? // EQ Settings. Don't seem to have an effect?
// Column( // Column(