~phablet-team/media-hub/fix-1538703

Viewing all changes in revision 185.

  • Committer: Konrad Zapałowicz
  • Date: 2016-04-15 18:35:06 UTC
  • Revision ID: konrad.zapalowicz@canonical.com-20160415183506-k8gyouah31uk52nm
Fix resetting the current player on disconnection and interface pollution

This commit changes:

* The condition under which the current player is reset. Originally
  this happened only for multimedia role however this turned out to be
  faulty and trigger an unwanted behavior [1]. This change allows the
  reset to happen only when it is a multimedia role [already there] and
  the player is the current player i.e. the Player instance that
  disconnected was the last player to play audio/video [added].

  In order to achieve this the ServiceSkeleton class has been extended
  with a new function to return the current player.

* Reduces the pollution of the Service interface, which has been
  introduced in rev 152 & 153, by moving the added functions to the
  ServiceSkeleton class. This is because the Service interface should
  be used only for DBus exported stuff.

1.

The issue as described by jibel was: I see 1 issue with the silo,
play a video, open the music app (video will pause), enqueue several
tracks and start playing (verify that MPRIS switched to music app),
reveal the spread and close the mediaplayer the controls switch to the
mediaplayer but the music continues playing then if you switch back to
the music app, the controls are still for the mediaplayer even if music
app is in the foreground and music is playign. I've to pause/play the
track in the music app for the music app to take control of mpris.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: