mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Fix Bohemic Smart Bracelet recognition
This commit is contained in:
parent
ef1d38d9d3
commit
0854263233
@ -17,19 +17,14 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
package nodomain.freeyourgadget.gadgetbridge.devices.lefun;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
|
||||
public class BohemicSmartBraceletDeviceCoordinator extends LefunDeviceCoordinator {
|
||||
@Override
|
||||
protected Pattern getSupportedDeviceName() {
|
||||
return Pattern.compile("\\.bohemic");
|
||||
public boolean supports(GBDeviceCandidate candidate) {
|
||||
// Since the Lefun coordinator overrides supports, we also need to
|
||||
return ".bohemic".equals(candidate.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +34,6 @@ import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.lefun.LefunDeviceSupport;
|
||||
|
||||
@ -56,7 +55,6 @@ public class LefunDeviceCoordinator extends AbstractBLEDeviceCoordinator {
|
||||
return BONDING_STYLE_NONE;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public boolean supports(GBDeviceCandidate candidate) {
|
||||
// There's a bunch of other names other than "Lefun", but let's just focus on one for now.
|
||||
|
Loading…
Reference in New Issue
Block a user