Skip to content

Commit

Permalink
Merge pull request #1 from DseSen/master
Browse files Browse the repository at this point in the history
fix a bug
  • Loading branch information
Ficat authored Oct 10, 2018
2 parents 58668cb + 7362025 commit 4b131e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions easyble/src/main/java/com/ficat/easyble/gatt/BleGattImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public void notify(final BleDevice device, String serviceUuid, String notifyUuid
BluetoothGattCharacteristic characteristic = service.getCharacteristic(UUID.fromString(notifyUuid));
boolean notify = (characteristic.getProperties() & BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0;
boolean indicate = (characteristic.getProperties() & BluetoothGattCharacteristic.PROPERTY_INDICATE) > 0;
if (!notify || !indicate) {
if (!notify &&!indicate) {
mHandler.post(new Runnable() {
@Override
public void run() {
Expand Down Expand Up @@ -715,9 +715,9 @@ private <T> UuidIdentify getUuidIdentifyFromMap(Map<UuidIdentify, T> map, String
return null;
}
for (UuidIdentify ui : map.keySet()) {
if (ui.address.equals(address)
&& ui.characteristicUuid.equals(characteristicUuid)
&& ui.serviceUuid.equals(serviceUuid)) {
if (ui.address.equalsIgnoreCase(address)
&& ui.characteristicUuid.equalsIgnoreCase(characteristicUuid)
&& ui.serviceUuid.equalsIgnoreCase(serviceUuid)) {
return ui;
}
}
Expand Down

0 comments on commit 4b131e7

Please sign in to comment.