diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
new file mode 100644
index 00000000..b268ef36
--- /dev/null
+++ b/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index c4b51594..fdf8d994 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -3,4 +3,4 @@
-
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 02b6f881..403dd456 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,3 +1,3 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/java/io/github/domi04151309/alwayson/services/NotificationService.kt b/app/src/main/java/io/github/domi04151309/alwayson/services/NotificationService.kt
index d02abf24..bb57205d 100644
--- a/app/src/main/java/io/github/domi04151309/alwayson/services/NotificationService.kt
+++ b/app/src/main/java/io/github/domi04151309/alwayson/services/NotificationService.kt
@@ -35,12 +35,12 @@ class NotificationService : NotificationListenerService() {
val rules = Rules(this)
@Suppress("ComplexCondition")
if (
- isValidNotification(notification)
- && !CombinedServiceReceiver.isScreenOn
- && !CombinedServiceReceiver.isAlwaysOnRunning
+ isValidNotification(notification) &&
+ !CombinedServiceReceiver.isScreenOn &&
+ !CombinedServiceReceiver.isAlwaysOnRunning &&
Rules.isAmbientMode(this) &&
- rules.canShow(this)
- && count >= 1
+ rules.canShow(this) &&
+ count >= 1
) {
startActivity(
Intent(
@@ -51,14 +51,13 @@ class NotificationService : NotificationListenerService() {
}
}
- override fun onNotificationRemoved(sbn: StatusBarNotification) {
+ override fun onNotificationRemoved(notification: StatusBarNotification) {
updateValues()
- val rules = Rules(this, prefs)
if (
- CombinedServiceReceiver.isAlwaysOnRunning
- && rules.isAmbientMode()
- && count < 1
+ CombinedServiceReceiver.isAlwaysOnRunning &&
+ Rules.isAmbientMode(this) &&
+ count < 1
) {
AlwaysOn.finish()
}
diff --git a/gradle.properties b/gradle.properties
index 2cbd6d19..3c5031eb 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -20,4 +20,4 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
+android.nonTransitiveRClass=true
\ No newline at end of file