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