mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
Improve logging
This commit is contained in:
parent
f7c9828cc1
commit
92bd3122f3
@ -18,6 +18,9 @@ package nodomain.freeyourgadget.gadgetbridge.deviceevents;
|
|||||||
|
|
||||||
|
|
||||||
public abstract class GBDeviceEvent {
|
public abstract class GBDeviceEvent {
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getClass().getSimpleName() + ": ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,4 +22,9 @@ import nodomain.freeyourgadget.gadgetbridge.R;
|
|||||||
public class GBDeviceEventVersionInfo extends GBDeviceEvent {
|
public class GBDeviceEventVersionInfo extends GBDeviceEvent {
|
||||||
public String fwVersion = GBApplication.getContext().getString(R.string.n_a);
|
public String fwVersion = GBApplication.getContext().getString(R.string.n_a);
|
||||||
public String hwVersion = GBApplication.getContext().getString(R.string.n_a);
|
public String hwVersion = GBApplication.getContext().getString(R.string.n_a);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return super.toString() + "fwVersion: " + fwVersion + "; hwVersion: " + hwVersion;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
|
|||||||
|
|
||||||
protected void handleGBDeviceEvent(GBDeviceEventVersionInfo infoEvent) {
|
protected void handleGBDeviceEvent(GBDeviceEventVersionInfo infoEvent) {
|
||||||
Context context = getContext();
|
Context context = getContext();
|
||||||
LOG.info("Got event for VERSION_INFO");
|
LOG.info("Got event for VERSION_INFO: " + infoEvent);
|
||||||
if (gbDevice == null) {
|
if (gbDevice == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user