From 7a05b9a95b54106a0da81f46e33ba3a6a1bb4634 Mon Sep 17 00:00:00 2001 From: Jens Date: Sun, 24 Jul 2022 22:50:11 +0200 Subject: [PATCH] device is starting-trigger enhanced --- app/src/main/java/com/jens/automation2/Trigger.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/jens/automation2/Trigger.java b/app/src/main/java/com/jens/automation2/Trigger.java index 9d83ff73..f172a680 100644 --- a/app/src/main/java/com/jens/automation2/Trigger.java +++ b/app/src/main/java/com/jens/automation2/Trigger.java @@ -411,12 +411,17 @@ public class Trigger boolean checkDeviceStarts() { - return checkServiceStarts() && !Settings.deviceStartDone; + if(triggerParameter && checkServiceStarts() && !Settings.deviceStartDone) + return true; + else if(!triggerParameter && !checkServiceStarts() && Settings.deviceStartDone) + return true; + else + return false; +// return checkServiceStarts() && !Settings.deviceStartDone && triggerParameter; } boolean checkServiceStarts() { -boolean result = !Settings.serviceStartDone == getTriggerParameter(); return !Settings.serviceStartDone == getTriggerParameter(); // return !Settings.serviceStartDone; }