Minor changes and a fix to a NPE when mBtGatt is null

This commit is contained in:
TaaviE
2020-07-28 08:10:39 +02:00
committed by Gitea
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,8 +681,13 @@ public class CasioGB6900DeviceSupport extends AbstractBTLEDeviceSupport {
@Override
public void onFindDevice(boolean start) {
if(!isConnected())
if (!isConnected()) {
return;
}
if (mBtGatt == null) {
return;
}
if (start) {
try {