diff --git a/app/src/main/java/com/jens/automation2/ActivityPermissions.java b/app/src/main/java/com/jens/automation2/ActivityPermissions.java
index 4d2a5eb..6bf0f00 100644
--- a/app/src/main/java/com/jens/automation2/ActivityPermissions.java
+++ b/app/src/main/java/com/jens/automation2/ActivityPermissions.java
@@ -456,7 +456,8 @@ public class ActivityPermissions extends Activity
{
case activityDetection:
addToArrayListUnique(permissionNameGoogleActivityDetection, requiredPermissions);
- addToArrayListUnique(Manifest.permission.ACTIVITY_RECOGNITION, requiredPermissions);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
+ addToArrayListUnique(Manifest.permission.ACTIVITY_RECOGNITION, requiredPermissions);
break;
case airplaneMode:
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
diff --git a/app/src/main/java/com/jens/automation2/ReceiverCoordinator.java b/app/src/main/java/com/jens/automation2/ReceiverCoordinator.java
index 14468b3..3dbc83d 100644
--- a/app/src/main/java/com/jens/automation2/ReceiverCoordinator.java
+++ b/app/src/main/java/com/jens/automation2/ReceiverCoordinator.java
@@ -395,7 +395,7 @@ public class ReceiverCoordinator
{
if(!HeadphoneJackListener.isHeadphoneJackListenerActive())
{
- Miscellaneous.logEvent("i", "LocationProvider", "Starting HeadphoneJackListener because used in a new/changed rule.", 4);
+ Miscellaneous.logEvent("i", "HeadphoneJackListener", "Starting HeadphoneJackListener because used in a new/changed rule.", 4);
if(HeadphoneJackListener.getInstance().haveAllPermission())
HeadphoneJackListener.getInstance().startListener(AutomationService.getInstance());
}
@@ -404,7 +404,7 @@ public class ReceiverCoordinator
{
if(HeadphoneJackListener.isHeadphoneJackListenerActive())
{
- Miscellaneous.logEvent("i", "LocationProvider", "Shutting down HeadphoneJackListener because not used in any rule.", 4);
+ Miscellaneous.logEvent("i", "HeadphoneJackListener", "Shutting down HeadphoneJackListener because not used in any rule.", 4);
HeadphoneJackListener.getInstance().stopListener(AutomationService.getInstance());
}
}
diff --git a/app/src/main/java/com/jens/automation2/receivers/HeadphoneJackListener.java b/app/src/main/java/com/jens/automation2/receivers/HeadphoneJackListener.java
index a145191..bf8754d 100644
--- a/app/src/main/java/com/jens/automation2/receivers/HeadphoneJackListener.java
+++ b/app/src/main/java/com/jens/automation2/receivers/HeadphoneJackListener.java
@@ -20,7 +20,7 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
private static boolean headsetConnected = false;
private static int headphoneType = -1;
- protected static boolean headphoneJackListenerActive=false;
+ protected static boolean headphoneJackListenerActive = false;
protected static IntentFilter headphoneJackListenerIntentFilter = null;
protected static HeadphoneJackListener instance;
@@ -108,7 +108,7 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
}
catch(Exception ex)
{
- Miscellaneous.logEvent("e", "ActivityDetectionReceiver", "Error starting HeadsetJackListener: " + Log.getStackTraceString(ex), 3);
+ Miscellaneous.logEvent("e", "HeadsetJackListener", "Error starting HeadsetJackListener: " + Log.getStackTraceString(ex), 3);
}
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4c93db4..b3f4cea 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -886,5 +886,5 @@
After clicking OK you\'ll be sent to a system dialog. Please select Automation there and allow "Display over other apps".
Variables are only available for parameter types String and URI
If you want to specify a parameter you also have to click \"Add intent pair\". Otherwise your changes will not be saved.
- This trigger will be valid if you just disconnected from the wifi specified above\n\nOR\n\nwhile the service is still starting and if you\'re not connected to any wifi.
+ This trigger will be valid if you just disconnected from the wifi specified above\n\nOR\n\nwhile the service is still starting and if you\'re not connected to any wifi.\n\nIf you want the trigger to fire only when you\'re explicitly disconnecting from a certain wifi, add another trigger \"service is not starting\".
\ No newline at end of file