Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d9eedbe authored by tibbi's avatar tibbi
Browse files

add an extra parameter to SelectAlarmSoundDialog to toggle looping

parent cc205689
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '3.17.13'
        propVersionName = '3.17.14'
        kotlin_version = '1.2.31'
        support_libs = '27.1.0'
    }
+3 −2
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ import kotlinx.android.synthetic.main.dialog_select_alarm_sound.view.*
import java.util.*

class SelectAlarmSoundDialog(val activity: BaseSimpleActivity, val currentUri: String, val audioStream: Int, val pickAudioIntentId: Int,
                             val type: Int, val onAlarmPicked: (alarmSound: AlarmSound?) -> Unit, val onAlarmSoundDeleted: (alarmSound: AlarmSound) -> Unit) {
                             val type: Int, val loopAudio: Boolean, val onAlarmPicked: (alarmSound: AlarmSound?) -> Unit,
                             val onAlarmSoundDeleted: (alarmSound: AlarmSound) -> Unit) {
    private val ADD_NEW_SOUND_ID = -2

    private val view = activity.layoutInflater.inflate(R.layout.dialog_select_alarm_sound, null)
@@ -118,7 +119,7 @@ class SelectAlarmSoundDialog(val activity: BaseSimpleActivity, val currentUri: S
                mediaPlayer = MediaPlayer().apply {
                    setAudioStreamType(audioStream)
                    setDataSource(activity, Uri.parse(alarmSound.uri))
                    isLooping = true
                    isLooping = loopAudio
                    prepare()
                    start()
                }