Merge lp:~phablet-team/telephony-service/audio-role into lp:telephony-service

Proposed by Jim Hodapp
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 1179
Merged at revision: 1179
Proposed branch: lp:~phablet-team/telephony-service/audio-role
Merge into: lp:telephony-service
Diff against target: 27 lines (+0/-8)
1 file modified
libtelephonyservice/ringtone.cpp (+0/-8)
To merge this branch: bzr merge lp:~phablet-team/telephony-service/audio-role
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+289700@code.launchpad.net

Commit message

Make sure the sound preview uses the correct audioRole API.

Description of the change

Make sure the sound preview uses the correct audioRole API.

To post a comment you must log in.
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libtelephonyservice/ringtone.cpp'
2--- libtelephonyservice/ringtone.cpp 2015-12-02 13:14:29 +0000
3+++ libtelephonyservice/ringtone.cpp 2016-03-21 19:06:33 +0000
4@@ -46,11 +46,7 @@
5 // pick up the new ringtone in case it changed in the meantime
6 mCallAudioPlaylist.addMedia(QUrl::fromLocalFile(GreeterContacts::instance()->incomingCallSound()));
7 mCallAudioPlayer = new QMediaPlayer(this);
8-#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
9- mCallAudioPlayer->setAudioRole(QMediaPlayer::AlertRole);
10-#else
11 mCallAudioPlayer->setAudioRole(QAudio::RingtoneRole);
12-#endif
13 mCallAudioPlayer->setPlaylist(&mCallAudioPlaylist);
14 mCallAudioPlayer->play();
15 }
16@@ -78,11 +74,7 @@
17
18 if (!mMessageAudioPlayer) {
19 mMessageAudioPlayer = new QMediaPlayer(this);
20-#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
21- mMessageAudioPlayer->setAudioRole(QMediaPlayer::AlertRole);
22-#else
23 mMessageAudioPlayer->setAudioRole(QAudio::NotificationRole);
24-#endif
25 }
26
27 // WORKAROUND: there is a bug in qmediaplayer/(media-hub?) that never goes into Stopped mode.

Subscribers

People subscribed via source and target branches

to all changes: