Merge lp:~nik90/ubuntu-clock-app/play-sound-preview into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 63
Merged at revision: 60
Proposed branch: lp:~nik90/ubuntu-clock-app/play-sound-preview
Merge into: lp:ubuntu-clock-app
Prerequisite: lp:~nik90/ubuntu-clock-app/add-custom-sound-backend
Diff against target: 58 lines (+12/-0)
3 files modified
app/alarm/AlarmSound.qml (+8/-0)
debian/changelog (+2/-0)
debian/control (+2/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/play-sound-preview
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
twstd (community) Approve
Nekhelesh Ramananthan Needs Fixing
Review via email: mp+230959@code.launchpad.net

Commit message

Plays the alarm sound when you select it in the alarm sound page. This will help users decide if they want to choose that ringtone or not.

Description of the change

Plays the alarm sound when you select it in the alarm sound page. This will help users decide if they want to choose that ringtone or not.

Requires image #199 and higher to test on phone.

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

#blocked due to some apparmor issues I think. Need to talk to jdhopp and jdstrand about this. The audio playback works on the desktop and not on device.

root@ubuntu-phablet:~# grep DEN /var/log/syslog
Aug 15 11:16:58 ubuntu-phablet kernel: [ 3968.875354] type=1400 audit(1408094218.079:104): apparmor="DENIED" operation="file_mmap" profile="/usr/bin/media-hub-server" name="/tmp/orcexec.CLp5yf" pid=5825 comm="aqueue:src" requested_mask="m" denied_mask="m" fsuid=32011 ouid=32011
Aug 15 11:16:58 ubuntu-phablet kernel: [ 3968.875506] type=1400 audit(1408094218.079:105): apparmor="DENIED" operation="mknod" profile="/usr/bin/media-hub-server" name="/run/user/32011/orcexec.cntnWk" pid=5825 comm="aqueue:src" requested_mask="c" denied_mask="c" fsuid=32011 ouid=32011

review: Needs Fixing
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Update 1: https://bugs.launchpad.net/media-hub/+bug/1357348 is the bug reported after talking to jdstrand. He suggested a fix that I could, however it didnt seem to fix it. May be there is a second issue we are facing. Will talk to jdhopp and update this MP.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

2:03 PM <jhodapp> nik90, yeah I have a pretty good guess of what it is, one sec
2:03 PM <nik90> jhodapp: yay :)
2:03 PM <sergiusens> nik90: is the tone in part of the clock apps directory space
2:04 PM → zoopster joined
2:04 PM <sergiusens> jhodapp: might be the same issue we had with paths?
2:04 PM <jhodapp> sergiusens, exactly
2:04 PM <nik90> sergiusens: directory space? as in does clock have permission to read that folder?
2:05 PM <nik90> jhodapp, sergiusens: Btw the ringtones i am playing are in /usr/share/sounds/ubuntu/ringtones
2:05 PM <jhodapp> nik90, no, as in media-hub won't play that sound for clock-app because of permission policy within media-hub
2:05 PM <nik90> jhodapp: but wasn't it fixed in https://bugs.launchpad.net/media-hub/+bug/1357348
2:05 PM <ubot5> Ubuntu bug 1357348 in mediascanner2 (Ubuntu) "Cannot play sound files due to apparmor permission issue" [Critical,In progress]
2:05 PM <jhodapp> nik90, yep, I can almost guarantee that's the issue now...technically an app is only allowed to play something from its own click *home dir*
2:06 PM <nik90> jhodapp: so how do I fix that in the clock app?
2:06 PM <sergiusens> nik90: click pkgdir com.ubuntu.clock that is
2:07 PM <nik90> sergiusens: ah no we don't ship that folder with the clock app
2:08 PM <jhodapp> nik90, you can check what's going on with media-hub by tailing the log while it tries to play that sound: "tail -f /home/phablet/.cache/upstart/media-hub.log"
2:09 PM — nik90 checks that now
2:09 PM <jhodapp> you should see a line like "client pkgname: com.ubuntu.music
2:09 PM <jhodapp> uri: file:///home/phablet/Music/01 - Gobbledigook.mp3
2:09 PM <jhodapp> Client can access content in ~/Music or ~/Videos""
2:09 PM <jhodapp> nik90, but it should say client not allow access...
2:10 PM <nik90> jhodapp: yup http://paste.ubuntu.com/8079472/
2:11 PM alan_g|lunch → alan_g
2:11 PM <nik90> jhodapp: so what would you advice me to do? Ship that folder internally with the clock app?
2:11 PM <jhodapp> nik90, so please ping jdstrand about this and if he is ok with adding another app exception to the media-hub policy

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Blocked due to https://bugs.launchpad.net/media-hub/+bug/1358278. However jhodapp said he will fix it quickly today itself.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

This has been fixed in https://code.launchpad.net/~jhodapp/media-hub/allow-shared-sounds/+merge/231242 which should be in #199. Hence this is no longer blocked. I confirm that this works on the phone. Just needs a code review.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

#unblocked

Revision history for this message
twstd (twstd-dev) :
review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
60. By Nekhelesh Ramananthan

uncommenting all code in alarm sound to test jenkins

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
61. By Nekhelesh Ramananthan

Uncommented multimedia library import and audio component declaration

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
62. By Nekhelesh Ramananthan

replace audio with media player

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
63. By Nekhelesh Ramananthan

Added qtdeclarative5-qtmultimedia-plugin dependency to debian control

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmSound.qml'
2--- app/alarm/AlarmSound.qml 2014-08-14 23:47:42 +0000
3+++ app/alarm/AlarmSound.qml 2014-08-19 19:14:22 +0000
4@@ -17,6 +17,7 @@
5 */
6
7 import QtQuick 2.0
8+import QtMultimedia 5.0
9 import Ubuntu.Components 1.1
10 import Ubuntu.Components.ListItems 1.0 as ListItem
11
12@@ -43,6 +44,10 @@
13 }
14 }
15
16+ Audio {
17+ id: previewAlarmSound
18+ }
19+
20 Flickable {
21 id: _pageFlickable
22
23@@ -91,6 +96,9 @@
24 : false
25 onClicked: {
26 if (checked) {
27+ previewAlarmSound.source = fileURL
28+ previewAlarmSound.play()
29+
30 alarmSound.subText = _soundName.text
31 alarm.sound = fileURL
32
33
34=== modified file 'debian/changelog'
35--- debian/changelog 2014-08-18 12:55:49 +0000
36+++ debian/changelog 2014-08-19 19:14:22 +0000
37@@ -9,6 +9,8 @@
38 * Added support for custom alarm sounds as per the design spec.
39 * Added UI support for searching cities online from geoname-lookup.ubuntu.com
40 * Improved error handling of jsontimezone model.
41+ * Added support to play alarm sound preview when selecting them in the alarm
42+ sound page. (LP: #1355410)
43
44 [David Planella]
45 * Added internationalization support (LP: #1354522)
46
47=== modified file 'debian/control'
48--- debian/control 2014-08-13 11:57:57 +0000
49+++ debian/control 2014-08-19 19:14:22 +0000
50@@ -24,6 +24,8 @@
51 qtdeclarative5-u1db1.0,
52 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
53 qtdeclarative5-xmllistmodel-plugin,
54+ qtdeclarative5-qtmultimedia-plugin,
55+ ubuntu-touch-sounds,
56 suru-icon-theme | ubuntu-mobile-icons,
57 ${misc:Depends},
58 ${shlibs:Depends},

Subscribers

People subscribed via source and target branches