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

Commit 4d312a2e authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Adding a dedicated ring for timer alerts

Bug: 7349294
Change-Id: I674ae774ccdc4d1f2cf57a1569b15aa51847dcfb
parent 93b0b26f
Loading
Loading
Loading
Loading
+171 KiB

File added.

No diff preview for this file type.

+3 −8
Original line number Diff line number Diff line
@@ -108,13 +108,6 @@ public class TimerRingService extends Service {
            Log.v("TimerRingSErvice.play()");
        }

        Uri alert;
        alert = RingtoneManager.getDefaultUri(
                RingtoneManager.TYPE_ALARM);
        if (Log.LOGV) {
            Log.v("Using default alarm: " + alert.toString());
        }

        // TODO: Reuse mMediaPlayer instead of creating a new one and/or use
        // RingtoneManager.
        mMediaPlayer = new MediaPlayer();
@@ -139,7 +132,9 @@ public class TimerRingService extends Service {
                setDataSourceFromResource(getResources(), mMediaPlayer,
                        R.raw.in_call_alarm);
            } else {
                mMediaPlayer.setDataSource(this, alert);
                AssetFileDescriptor afd = getAssets().openFd("sounds/Timer_Expire.ogg");
                mMediaPlayer.setDataSource(
                        afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
            }
            startAlarm(mMediaPlayer);
        } catch (Exception ex) {