2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Fix division by 0

This commit is contained in:
Albert Vaca Cintora
2022-01-24 14:01:49 +01:00
parent 209f0f8f43
commit c9b2b53d59

View File

@@ -133,6 +133,7 @@ class MprisReceiverPlayer {
int getVolume() {
MediaController.PlaybackInfo info = controller.getPlaybackInfo();
if (info == null) return 0;
if (info.getMaxVolume() == 0) return 0;
return 100 * info.getCurrentVolume() / info.getMaxVolume();
}