From b35ce0f82169586465e3026fcd11e23f78319a27 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Thu, 29 Sep 2016 14:15:31 +0200 Subject: [PATCH] Do not clear values if the player didn't actually change --- .../kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java index 1c98df70..e7a6e3e7 100644 --- a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java +++ b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java @@ -176,6 +176,11 @@ public class MprisActivity extends ActionBarActivity { if (pos >= playerList.size()) return; + String player = playerList.get(pos); + if (player.equals(mpris.getPlayer())) { + return; //Player hasn't actually changed + } + mpris.setPlayer(player); //Clear values from previous player ((TextView) findViewById(R.id.now_playing_textview)).setText("");