From ca81e6a7bd5790f3e80e675348a18a7b0dd35fb4 Mon Sep 17 00:00:00 2001 From: Jens Date: Sun, 15 Jan 2023 23:18:42 +0100 Subject: [PATCH] Log improvements --- .../main/java/com/jens/automation2/PointOfInterest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/jens/automation2/PointOfInterest.java b/app/src/main/java/com/jens/automation2/PointOfInterest.java index 2f87886..9f02ece 100644 --- a/app/src/main/java/com/jens/automation2/PointOfInterest.java +++ b/app/src/main/java/com/jens/automation2/PointOfInterest.java @@ -421,14 +421,18 @@ public class PointOfInterest implements Comparable public boolean create(Context context) { for(PointOfInterest poi : PointOfInterest.pointOfInterestCollection) - if(poi.getName().equals(this.getName())) + { + if (poi.getName().equals(this.getName())) { Toast.makeText(context, context.getResources().getString(R.string.anotherPoiByThatName), Toast.LENGTH_LONG).show(); return false; } + } if(plausibilityCheck()) { + Miscellaneous.logEvent("i", "Creating POI", this.toStringLong(), 3); + PointOfInterest.pointOfInterestCollection.add(this); PointOfInterest.writePoisToFile(); @@ -492,6 +496,8 @@ public class PointOfInterest implements Comparable if (plausibilityCheck()) { + Miscellaneous.logEvent("i", "Changing POI", "Old name: " + this.oldName + ", new data: " + this.toStringLong(), 3); + if(PointOfInterest.writePoisToFile()) { AutomationService service = AutomationService.getInstance();