Merge lp:~phablet-team/telephony-service/sms-notif-lp1544477 into lp:telephony-service

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 1201
Merged at revision: 1202
Proposed branch: lp:~phablet-team/telephony-service/sms-notif-lp1544477
Merge into: lp:telephony-service
Diff against target: 20 lines (+10/-0)
1 file modified
libtelephonyservice/ringtone.cpp (+10/-0)
To merge this branch: bzr merge lp:~phablet-team/telephony-service/sms-notif-lp1544477
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+303680@code.launchpad.net

Commit message

Make sure we play notification sounds if media-hub re-starts
(LP: #1544477).

Description of the change

Make sure we play notification sounds if media-hub re-starts
(LP: #1544477).

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

Looks good!

review: Approve
Revision history for this message
Jim Hodapp (jhodapp) :
review: Needs Fixing (code)
1202. By Alfonso Sanchez-Beato

Fix style issue

Revision history for this message
Jim Hodapp (jhodapp) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libtelephonyservice/ringtone.cpp'
--- libtelephonyservice/ringtone.cpp 2016-03-21 19:05:02 +0000
+++ libtelephonyservice/ringtone.cpp 2016-08-23 14:43:38 +0000
@@ -72,6 +72,16 @@
72 return;72 return;
73 }73 }
7474
75 // Re-create if in error state. A typical case is when media-hub-server has
76 // crashed and we need to start from a clean slate.
77 if (mMessageAudioPlayer && mMessageAudioPlayer->error()) {
78 qDebug() << "mMessageAudioPlayer in error state ("
79 << mMessageAudioPlayer->error() << "), recreating";
80
81 mMessageAudioPlayer->deleteLater();
82 mMessageAudioPlayer = NULL;
83 }
84
75 if (!mMessageAudioPlayer) {85 if (!mMessageAudioPlayer) {
76 mMessageAudioPlayer = new QMediaPlayer(this);86 mMessageAudioPlayer = new QMediaPlayer(this);
77 mMessageAudioPlayer->setAudioRole(QAudio::NotificationRole);87 mMessageAudioPlayer->setAudioRole(QAudio::NotificationRole);

Subscribers

People subscribed via source and target branches

to all changes: