Skip to content

Commit

Permalink
Merge pull request #162 from pachi81/develop
Browse files Browse the repository at this point in the history
Fix custom sound level in vibration mode
  • Loading branch information
pachi81 authored Jul 14, 2024
2 parents 97c4e13 + 8592392 commit 2f9ca85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down

0 comments on commit 2f9ca85

Please sign in to comment.