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

Commit e66675d8 authored by James Lemieux's avatar James Lemieux
Browse files

Restore audible alarm sounds

A trivial mistake in a recent CL occurred when AlarmService changed
from if statements to a switch statement but neglected an important
break; Consequently, an Alarm would start to make sound and then
immediately be silenced.

Bug: 21741155
Change-Id: I0ff30718157c4d8547618768a0e84c088093fb42
parent bcdd6c39
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ public class AlarmService extends Service {

        final long instanceId = AlarmInstance.getId(intent.getData());
        switch (intent.getAction()) {
            case START_ALARM_ACTION: {
            case START_ALARM_ACTION:
                final ContentResolver cr = this.getContentResolver();
                final AlarmInstance instance = AlarmInstance.getInstance(cr, instanceId);
                if (instance == null) {
@@ -237,8 +237,8 @@ public class AlarmService extends Service {
                    break;
                }
                startAlarm(instance);
            }
            case STOP_ALARM_ACTION: {
                break;
            case STOP_ALARM_ACTION:
                if (mCurrentAlarm != null && mCurrentAlarm.mId != instanceId) {
                    LogUtils.e("Can't stop alarm for instance: %d because current alarm is: %d",
                            instanceId, mCurrentAlarm.mId);
@@ -247,7 +247,6 @@ public class AlarmService extends Service {
                stopCurrentAlarm();
                stopSelf();
        }
        }

        return Service.START_NOT_STICKY;
    }