mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
fix: Physical Layer (PHY) mask on MIUI for gadgets other than Casio GBX100
This commit is contained in:
+5
-1
@@ -615,7 +615,11 @@ public abstract class AbstractDeviceCoordinator implements DeviceCoordinator {
|
||||
|
||||
@Override
|
||||
public int getBlePhyMask() {
|
||||
return BluetoothDevice.PHY_LE_CODED_MASK;
|
||||
// this is specified as a recommendation ("prefer to use ...") by Google
|
||||
// however some roms - e.g. MIUI - treat it as law ("must only use ...") (#6230)
|
||||
// -> by default prefer more reliable physical layers (PHYs) over high throughput 2M
|
||||
|
||||
return BluetoothDevice.PHY_LE_1M_MASK | BluetoothDevice.PHY_LE_CODED_MASK;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-5
@@ -717,7 +717,8 @@ public interface DeviceCoordinator {
|
||||
/**
|
||||
* Returns the preferred BLE PHY mask for GATT connections, as passed to
|
||||
* {@link android.bluetooth.BluetoothDevice#connectGatt}. Defaults to
|
||||
* {@link android.bluetooth.BluetoothDevice#PHY_LE_CODED_MASK}
|
||||
* {@link android.bluetooth.BluetoothDevice#PHY_LE_1M_MASK} and
|
||||
* {@link android.bluetooth.BluetoothDevice#PHY_LE_CODED_MASK}.
|
||||
*/
|
||||
int getBlePhyMask();
|
||||
|
||||
@@ -733,7 +734,7 @@ public interface DeviceCoordinator {
|
||||
boolean isExperimental();
|
||||
|
||||
/**
|
||||
* Indicates whether the device has some kind of calender we can sync to.
|
||||
* Indicates whether the device has some kind of calendar we can sync to.
|
||||
* Also used for generated sunrise/sunset events
|
||||
*/
|
||||
boolean supportsCalendarEvents(@NonNull final GBDevice device);
|
||||
@@ -834,7 +835,7 @@ public interface DeviceCoordinator {
|
||||
int getContactsSlotCount(@NonNull final GBDevice device);
|
||||
|
||||
/**
|
||||
* Indicates whether the device has an led which supports custom colors
|
||||
* Indicates whether the device has an LED which supports custom colors
|
||||
*/
|
||||
boolean supportsLedColor(@NonNull final GBDevice device);
|
||||
|
||||
@@ -851,7 +852,7 @@ public interface DeviceCoordinator {
|
||||
int[] getColorPresets();
|
||||
|
||||
/**
|
||||
* Indicates whether the device supports unicode emojis.
|
||||
* Indicates whether the device supports Unicode emojis.
|
||||
*/
|
||||
boolean supportsUnicodeEmojis(@NonNull final GBDevice device);
|
||||
|
||||
@@ -1026,4 +1027,4 @@ public interface DeviceCoordinator {
|
||||
/// @see #supportsMetrics(GBDevice)
|
||||
@Nullable
|
||||
GenericMetricSampleProvider getMetricsSampleProvider(@NonNull GBDevice device, @NonNull DaoSession session);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user