Should provide policy based lifecycle exceptions

Bug #1241185 reported by Ken VanDine
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Won't Fix
Undecided
Unassigned
ubuntu-application-lifecycle
New
Undecided
Unassigned
unity-mir
Invalid
High
Unassigned
qtmir (Ubuntu)
Invalid
Undecided
Unassigned
unity-mir (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Currently, unity-mir has a hard coded exception to prevent music-app from suspending when losing focus. We need a way to allow other apps to continue playback of music, etc. For example, I've tried to help get panpipe (pandora app) usable on the phone, however without the ability to playback continuously it isn't useful.

Perhaps lifecycle management exceptions based on apparmor-easyprof-ubuntu policy?

Related branches

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity-mir at revision 153, scheduled for release in unity-mir, milestone phone-v1-freeze

Changed in unity-mir:
status: New → Fix Committed
Changed in unity-mir:
assignee: nobody → Victor Thompson (vthompson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-mir - 0.2+14.04.20131128.2-0ubuntu1

---------------
unity-mir (0.2+14.04.20131128.2-0ubuntu1) trusty; urgency=low

  [ Gerry Boland ]
  * Install ServerStatusListener to be notified of mir server start, pause
    and resume. Use start notification to send SIGSTOP signal to upstart,
    so it knows mir is ready for other clients.
  * Bump version number
  * InputArea: don't use lambda function as slot, can cause crash on
    shutdown Using lambda function as slot can introduce crash as the
    slot's object deletion is not registered unlike with traditional
    signal/slot connections. As a result, on signal emission, the lambda
    can be called on a deleted object. (LP: #1253685)
  * Misc fixes for Mir 0.1.2 support. (LP: #1254986)

  [ Alan Griffiths ]
  * ApplicationSession is a Mir implementation class that shouldn't be
    used by unity-mir, use shell::session instead.

  [ Kevin Gunn ]
  * mir server abi and api broke, updating dependency to deb 0.1.1.
  * update mir deb build dep to 0.1.2

  [ Victor Thompson ]
  * Fix mir to not suspend the music-app, or any other app granted a
    lifecycle exception, when switching between apps. (LP: #1241185,
    #1241045)

  [ Daniel van Vugt ]
  * Force the screen to redraw after turning the display back on (LP:
    #1255045). Also stop the compositor when the screen is off.
    Otherwise it will spin in the background, eating battery. (LP:
    #1255045)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 154
 -- Ubuntu daily release <email address hidden> Thu, 28 Nov 2013 16:19:49 +0000

Changed in unity-mir (Ubuntu):
status: New → Fix Released
Michał Sawicz (saviq)
Changed in unity-mir:
status: Fix Committed → Fix Released
Michał Sawicz (saviq)
Changed in unity-mir:
assignee: Victor Thompson (vthompson) → nobody
status: Fix Released → Confirmed
status: Confirmed → Triaged
importance: Undecided → High
Changed in unity-mir (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Thomas Voß (thomas-voss) wrote :

Our lifecycle policy is strict on purpose, and we hardcode excpetions for a very good reason. In the case of music playback, the application (even the core Music app) should ideally leverage the music hub (https://launchpad.net/music-hub). We only granted an exception to the music app due to time constraints by the end of last cycle.

With that, we should mark this bug as "Won't fix" and instead focus on getting the music-hub generally useful.

Revision history for this message
Florian W. (florian-will) wrote :

Since you want to mark this bug as "Won't fix", can you point me to some docs for music-hub? I can only find some info about QtMultimedia.MediaPlayer related to music-hub, but that QML API is apparently missing the functionality described in this bug report.

I'm already using QtMultimedia.MediaPlayer, and while that allows me to keep playing the current song when the display turns off or I switch to another app, which is already a huge improvement over the state from ~1.5 years ago when I tried this the last time, it's still not even close to "good enough".

When the current song ends, the MediaPlayer.onStatusChanged signal is not executed immediately, but only after I switch back to my app or unlock the phone. As far as I can tell, that signal is the only place where I could start playback of the next song. So it's just silent after the current song ends, clearly a very bad user experience.

You should either allow apps to run the slot connected to that signal whenever it is fired (which might be pretty difficult to solve and opens up a lifecycle policy exploit), or add a queue API to QtMultimedia / some other QML namespace. (On a related note, a signal like "playbackAboutToFinish" could allow implementing gapless playback in the future.)

If you do the queue thing, make sure to support programatically deleting from the queue before the media is played: I want to implement "play next song from my app's queue, or if the user has not enqueued any songs, play next song from album". If I am supposed to use the music-app queue, I have to enqueue all the remaining songs on the current album when playback starts. If a user then adds something to the app queue, I must be able to remove everything from the music-hub queue, add the user-provided song, then add every song following the newly enqueued song on its album.

Revision history for this message
Johan Guerreros (johangm90) wrote :

i created a streaming music player https://bugs.launchpad.net/cloudmusic and users have a bad experience because of this bug fix it please

Revision history for this message
Gerry Boland (gerboland) wrote :

Lifecycle decisions now made by unity8, not qtmir/unity-mir. Reassigning.

Changed in qtmir:
status: New → Invalid
Changed in unity-mir:
status: Triaged → Invalid
Changed in unity-mir (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Reassigning to canonical-devices-system-image. Unity8 just reads and executes the exception-list. If that exception list is the fix for this bug or not remains to be decided, but if so, it requires changes in apparmor rather than unity8.

affects: unity8 (Ubuntu) → canonical-devices-system-image
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Not sure this bug is still valid or ever was, the proper fix has been to improve the use of media hub by the music app and webapps doing streaming. and also to augment the backgound services to deliver more capabilities. We do not intend to have exceptions ultimately.

I would like to mark this won't fix

Changed in canonical-devices-system-image:
status: New → Won't Fix
Michał Sawicz (saviq)
affects: qtmir → qtmir (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.