1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 11:33:19 +02:00

Fix discovery on devices with Android version < Lollipop

also reduce the amount of lines logged in discovery activity.
This commit is contained in:
Daniele Gobbetti 2018-07-22 14:52:17 +02:00
parent 290c6c53fb
commit a5dd88df53

View File

@ -231,9 +231,7 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
public void logMessageContent(byte[] value) {
if (value != null) {
for (byte b : value) {
LOG.warn("DATA: " + String.format("0x%2x", b) + " - " + (char) (b & 0xff));
}
LOG.warn("DATA: " + GB.hexdump(value, 0, value.length));
}
}
@ -630,7 +628,7 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
super.onPause();
stopBTDiscovery();
stopBTLEDiscovery();
if (GB.supportsBluetoothLE()) {
if (GBApplication.isRunningLollipopOrLater()) {
stopNewBTLEDiscovery();
}
}