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:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user