2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

mprisplugin: allow hiding per-app volume meter if not supported by remote media app

This commit is contained in:
Piyush Aggarwal
2021-06-22 08:10:21 +05:30
parent 432753154f
commit 116fa02795
2 changed files with 4 additions and 2 deletions

View File

@@ -338,7 +338,9 @@ public class MprisNowPlayingFragment extends Fragment implements VolumeKeyListen
int volume = playerStatus.getVolume();
mprisControlBinding.volumeSeek.setProgress(volume);
if(!playerStatus.isSetVolumeAllowed()) {
mprisControlBinding.volumeSeek.setEnabled(false);
}
boolean isPlaying = playerStatus.isPlaying();
if (isPlaying) {
mprisControlBinding.playButton.setImageResource(R.drawable.ic_pause_black);

View File

@@ -150,7 +150,7 @@ public class MprisPlugin extends Plugin {
}
public boolean isSetVolumeAllowed() {
return !isSpotify();
return !isSpotify() && (getVolume() > -1);
}
public long getPosition() {