remove bleonly mode, use CAPod instead

This commit is contained in:
Kavish Devar
2025-09-28 12:27:42 +05:30
parent 08738a1293
commit 3f582b8fcf
3 changed files with 40 additions and 71 deletions

View File

@@ -102,7 +102,6 @@ fun AirPodsSettingsScreen(dev: BluetoothDevice?, service: AirPodsService,
var isLocallyConnected by remember { mutableStateOf(isConnected) } var isLocallyConnected by remember { mutableStateOf(isConnected) }
var isRemotelyConnected by remember { mutableStateOf(isRemotelyConnected) } var isRemotelyConnected by remember { mutableStateOf(isRemotelyConnected) }
val sharedPreferences = LocalContext.current.getSharedPreferences("settings", MODE_PRIVATE) val sharedPreferences = LocalContext.current.getSharedPreferences("settings", MODE_PRIVATE)
val bleOnlyMode = sharedPreferences.getBoolean("ble_only_mode", false)
var device by remember { mutableStateOf(dev) } var device by remember { mutableStateOf(dev) }
var deviceName by remember { var deviceName by remember {
mutableStateOf( mutableStateOf(
@@ -236,22 +235,6 @@ fun AirPodsSettingsScreen(dev: BluetoothDevice?, service: AirPodsService,
BatteryView(service = service) BatteryView(service = service)
Spacer(modifier = Modifier.height(32.dp)) Spacer(modifier = Modifier.height(32.dp))
// Show BLE-only mode indicator
if (bleOnlyMode) {
Text(
text = "BLE-only mode - advanced features disabled",
style = TextStyle(
fontSize = 14.sp,
fontWeight = FontWeight.Medium,
color = (if (isSystemInDarkTheme()) Color.White else Color.Black).copy(alpha = 0.6f),
fontFamily = FontFamily(Font(R.font.sf_pro))
),
modifier = Modifier.padding(8.dp, bottom = 16.dp)
)
}
// Only show name field when not in BLE-only mode
if (!bleOnlyMode) {
NavigationButton( NavigationButton(
to = "rename", to = "rename",
name = stringResource(R.string.name), name = stringResource(R.string.name),
@@ -306,8 +289,6 @@ fun AirPodsSettingsScreen(dev: BluetoothDevice?, service: AirPodsService,
Spacer(modifier = Modifier.height(16.dp)) Spacer(modifier = Modifier.height(16.dp))
NavigationButton("debug", "Debug", navController) NavigationButton("debug", "Debug", navController)
}
Spacer(Modifier.height(24.dp)) Spacer(Modifier.height(24.dp))
} }
} }

View File

@@ -229,15 +229,6 @@ fun AppSettingsScreen(navController: NavController) {
sharedPreferences = sharedPreferences, sharedPreferences = sharedPreferences,
) )
StyledToggle(
title = stringResource(R.string.connection_mode),
label = stringResource(R.string.ble_only_mode),
description = stringResource(R.string.ble_only_mode_description),
checkedState = bleOnlyMode,
sharedPreferenceKey = "ble_only_mode",
sharedPreferences = sharedPreferences,
)
Text( Text(
text = stringResource(R.string.conversational_awareness), text = stringResource(R.string.conversational_awareness),
style = TextStyle( style = TextStyle(

View File

@@ -142,9 +142,6 @@
<string name="widget">Widget</string> <string name="widget">Widget</string>
<string name="show_phone_battery_in_widget">Show phone battery in widget</string> <string name="show_phone_battery_in_widget">Show phone battery in widget</string>
<string name="show_phone_battery_in_widget_description">Display your phone\'s battery level in the widget alongside AirPods battery</string> <string name="show_phone_battery_in_widget_description">Display your phone\'s battery level in the widget alongside AirPods battery</string>
<string name="connection_mode">Connection Mode</string>
<string name="ble_only_mode">BLE Only Mode</string>
<string name="ble_only_mode_description">Only use Bluetooth Low Energy for battery data and ear detection. Disables advanced features requiring L2CAP connection.</string>
<string name="conversational_awareness_volume">Conversational Awareness Volume</string> <string name="conversational_awareness_volume">Conversational Awareness Volume</string>
<string name="quick_settings_tile">Quick Settings Tile</string> <string name="quick_settings_tile">Quick Settings Tile</string>
<string name="open_dialog_for_controlling">Open dialog for controlling</string> <string name="open_dialog_for_controlling">Open dialog for controlling</string>