diff --git a/build.gradle b/build.gradle index bbd2184e..3253b69c 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { Properties properties = new Properties() properties.load(project.rootProject.file('local.properties').newDataInputStream()) -project.ext.set("versionCode", 60) +project.ext.set("versionCode", 61) project.ext.set("versionName", "1.1") project.ext.set("compileSdk", 34) project.ext.set("targetSdk", 34) diff --git a/common/src/main/java/de/michelinside/glucodatahandler/common/notification/AlarmNotificationBase.kt b/common/src/main/java/de/michelinside/glucodatahandler/common/notification/AlarmNotificationBase.kt index bf27a4a2..bbbf6b98 100644 --- a/common/src/main/java/de/michelinside/glucodatahandler/common/notification/AlarmNotificationBase.kt +++ b/common/src/main/java/de/michelinside/glucodatahandler/common/notification/AlarmNotificationBase.kt @@ -556,12 +556,13 @@ abstract class AlarmNotificationBase: NotifierInterface, SharedPreferences.OnSha } } } - val soundLevel = getSoundLevel(alarmType, context) - if (soundLevel >= 0) { - lastSoundLevel = getCurrentSoundLevel() - Log.d(LOG_ID, "Set cur sound level $lastSoundLevel to $soundLevel") - setSoundLevel(soundLevel) - + if(audioManager.ringerMode == AudioManager.RINGER_MODE_NORMAL) { + val soundLevel = getSoundLevel(alarmType, context) + if (soundLevel >= 0) { + lastSoundLevel = getCurrentSoundLevel() + Log.d(LOG_ID, "Set cur sound level $lastSoundLevel to $soundLevel") + setSoundLevel(soundLevel) + } } } catch (exc: Exception) { Log.e(LOG_ID, "checkCreateSound exception: " + exc.message.toString() )