diff --git a/app/src/main/java/com/jens/automation2/PointOfInterest.java b/app/src/main/java/com/jens/automation2/PointOfInterest.java index 2f878862..9f02ece6 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();