@@ -427,7 +427,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
427427
428428 if (! contains(" qs_click_behavior" )) putString(" qs_click_behavior" , " cycle" )
429429 if (! contains(" name" )) putString(" name" , " AirPods" )
430- if (! contains(" ble_only_mode" )) putBoolean(" ble_only_mode" , false )
431430
432431 if (! contains(" left_single_press_action" )) putString(
433432 " left_single_press_action" ,
@@ -612,7 +611,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
612611 }
613612
614613 Log .d(" AirPodsCrossDevice" , CrossDevice .isAvailable.toString())
615- if (! CrossDevice .isAvailable && ! config.bleOnlyMode ) {
614+ if (! CrossDevice .isAvailable) {
616615 Log .d(" AirPodsService" , " ${config.deviceName} connected" )
617616 CoroutineScope (Dispatchers .IO ).launch {
618617 connectToSocket(device!! )
@@ -624,12 +623,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
624623 sharedPreferences.edit {
625624 putString(" mac_address" , macAddress)
626625 }
627- } else if (config.bleOnlyMode) {
628- Log .d(" AirPodsService" , " BLE-only mode: skipping L2CAP connection" )
629- macAddress = device!! .address
630- sharedPreferences.edit {
631- putString(" mac_address" , macAddress)
632- }
633626 }
634627 } else if (intent?.action == AirPodsNotifications .AIRPODS_DISCONNECTED ) {
635628 device = null
@@ -695,7 +688,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
695688 if (profile == BluetoothProfile .A2DP ) {
696689 val connectedDevices = proxy.connectedDevices
697690 if (connectedDevices.isNotEmpty()) {
698- if (! CrossDevice .isAvailable && ! config.bleOnlyMode ) {
691+ if (! CrossDevice .isAvailable) {
699692 CoroutineScope (Dispatchers .IO ).launch {
700693 connectToSocket(device)
701694 }
@@ -704,12 +697,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
704697 sharedPreferences.edit {
705698 putString(" mac_address" , macAddress)
706699 }
707- } else if (config.bleOnlyMode) {
708- Log .d(" AirPodsService" , " BLE-only mode: skipping L2CAP connection" )
709- macAddress = device.address
710- sharedPreferences.edit {
711- putString(" mac_address" , macAddress)
712- }
713700 }
714701 this @AirPodsService.sendBroadcast(
715702 Intent (AirPodsNotifications .AIRPODS_CONNECTED )
@@ -1143,7 +1130,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
11431130 conversationalAwarenessVolume = sharedPreferences.getInt(" conversational_awareness_volume" , 43 ),
11441131 textColor = sharedPreferences.getLong(" textColor" , - 1L ),
11451132 qsClickBehavior = sharedPreferences.getString(" qs_click_behavior" , " cycle" ) ? : " cycle" ,
1146- bleOnlyMode = sharedPreferences.getBoolean(" ble_only_mode" , false ),
11471133
11481134 // AirPods state-based takeover
11491135 takeoverWhenDisconnected = sharedPreferences.getBoolean(" takeover_when_disconnected" , true ),
@@ -1188,7 +1174,6 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
11881174 " conversational_awareness_volume" -> config.conversationalAwarenessVolume = preferences.getInt(key, 43 )
11891175 " textColor" -> config.textColor = preferences.getLong(key, - 1L )
11901176 " qs_click_behavior" -> config.qsClickBehavior = preferences.getString(key, " cycle" ) ? : " cycle"
1191- " ble_only_mode" -> config.bleOnlyMode = preferences.getBoolean(key, false )
11921177
11931178 // AirPods state-based takeover
11941179 " takeover_when_disconnected" -> config.takeoverWhenDisconnected = preferences.getBoolean(key, true )
@@ -1686,7 +1671,7 @@ class AirPodsService : Service(), SharedPreferences.OnSharedPreferenceChangeList
16861671 PendingIntent .FLAG_UPDATE_CURRENT or PendingIntent .FLAG_IMMUTABLE
16871672 )
16881673
1689- if (! ::socket.isInitialized && ! config.bleOnlyMode ) {
1674+ if (! ::socket.isInitialized) {
16901675 return
16911676 }
16921677 if (connected && (config.bleOnlyMode || socket.isConnected)) {
0 commit comments