mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 13:47:41 +00:00
Fix NPE
This commit is contained in:
@@ -188,6 +188,11 @@ public class FindMyPhonePlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stopPlaying() {
|
void stopPlaying() {
|
||||||
|
if (audioManager == null) {
|
||||||
|
// The Plugin was destroyed (probably the device disconnected)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (previousVolume != -1) {
|
if (previousVolume != -1) {
|
||||||
audioManager.setStreamVolume(AudioManager.STREAM_ALARM, previousVolume, 0);
|
audioManager.setStreamVolume(AudioManager.STREAM_ALARM, previousVolume, 0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user