mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
ble: support gadget initiated connections
The BluetoothDevice.ACTION_ACL_CONNECTED intent indicating gadget or Android imitated connections is not specific to Bluetooth Classic. So make the GBPrefs.DEVICE_CONNECT_BACK setting available to both Bluetooth Classic and BLE.
This commit is contained in:
committed by
José Rebelo
parent
6d256262d5
commit
c159a13a66
+2
-2
@@ -796,8 +796,8 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
if (connectionType.usesBluetoothLE()) {
|
||||
settings = ArrayUtils.insert(0, settings, R.xml.devicesettings_reconnect_ble);
|
||||
}
|
||||
if (connectionType.usesBluetoothClassic()) {
|
||||
settings = ArrayUtils.insert(0, settings, R.xml.devicesettings_reconnect_bl_classic);
|
||||
if (connectionType.usesBluetoothClassic() || connectionType.usesBluetoothLE()) {
|
||||
settings = ArrayUtils.insert(0, settings, R.xml.devicesettings_device_connect_back);
|
||||
}
|
||||
|
||||
if (connectionType.usesBluetoothLE() || connectionType.usesBluetoothClassic()){
|
||||
|
||||
+1
-4
@@ -1,10 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:title="@string/connection_over_bt_classic" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:icon="@drawable/ic_bluetooth"
|
||||
android:icon="@drawable/ic_bluetooth_connected"
|
||||
android:key="prefs_key_device_reconnect_on_acl"
|
||||
android:layout="@layout/preference_checkbox"
|
||||
android:title="@string/autoconnect_from_device_title"
|
||||
@@ -4,7 +4,7 @@
|
||||
android:title="@string/connection_over_ble" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:icon="@drawable/ic_bluetooth"
|
||||
android:icon="@drawable/ic_bluetooth_searching"
|
||||
android:key="prefs_key_device_auto_reconnect"
|
||||
android:layout="@layout/preference_checkbox"
|
||||
android:title="@string/auto_reconnect_ble_title"
|
||||
|
||||
Reference in New Issue
Block a user