Always play when call ended

Summary:
When the music is resumed during the call it was paused again when the call ends

Bug: 400787

Test Plan: Get called, resume music during call, check state after call

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16809
This commit is contained in:
Nicolas Fella 2018-11-15 00:46:05 +01:00
parent e82fce2329
commit 4bd509dfce

View file

@ -103,7 +103,7 @@ bool PauseMusicPlugin::receivePacket(const NetworkPacket& np)
if (pause && !pausedSources.empty()) { if (pause && !pausedSources.empty()) {
for (const QString& iface : qAsConst(pausedSources)) { for (const QString& iface : qAsConst(pausedSources)) {
QDBusInterface mprisInterface(iface, QStringLiteral("/org/mpris/MediaPlayer2"), QStringLiteral("org.mpris.MediaPlayer2.Player")); QDBusInterface mprisInterface(iface, QStringLiteral("/org/mpris/MediaPlayer2"), QStringLiteral("org.mpris.MediaPlayer2.Player"));
mprisInterface.asyncCall(QStringLiteral("PlayPause")); mprisInterface.asyncCall(QStringLiteral("Play"));
} }
pausedSources.clear(); pausedSources.clear();
} }