mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-29 12:05:53 +01:00
Minor changes and a fix to a NPE when mBtGatt is null
This commit is contained in:
parent
443658bf9e
commit
bcac8e0d7f
@ -186,8 +186,9 @@ public class CasioGB6900DeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
// FIXME: Replace hardcoded values by configuration
|
||||
private void configureWatch(TransactionBuilder builder) {
|
||||
if (mBtGatt == null)
|
||||
if (mBtGatt == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
byte value[] = new byte[]{GattCharacteristic.MILD_ALERT};
|
||||
|
||||
@ -680,10 +681,15 @@ public class CasioGB6900DeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
@Override
|
||||
public void onFindDevice(boolean start) {
|
||||
if(!isConnected())
|
||||
if (!isConnected()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(start) {
|
||||
if (mBtGatt == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (start) {
|
||||
try {
|
||||
TransactionBuilder builder = performInitialized("findDevice");
|
||||
byte value[] = new byte[]{GattCharacteristic.HIGH_ALERT};
|
||||
|
Loading…
Reference in New Issue
Block a user