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:
@@ -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);
|
||||
|
@@ -150,7 +150,7 @@ public class MprisPlugin extends Plugin {
|
||||
}
|
||||
|
||||
public boolean isSetVolumeAllowed() {
|
||||
return !isSpotify();
|
||||
return !isSpotify() && (getVolume() > -1);
|
||||
}
|
||||
|
||||
public long getPosition() {
|
||||
|
Reference in New Issue
Block a user