1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-23 05:20:35 +02:00

Fix crash when receiving empty music state

This commit is contained in:
Arjan Schrijver 2024-02-04 20:35:40 +01:00
parent 145c2b8c6c
commit 8aaa766dcd

View File

@ -700,6 +700,7 @@ public class NotificationListener extends NotificationListenerService {
};
mHandler.postDelayed(mSetMusicInfoRunnable, 100);
if (stateSpec != null) {
if (mSetMusicStateRunnable != null) {
mHandler.removeCallbacks(mSetMusicStateRunnable);
}
@ -709,6 +710,7 @@ public class NotificationListener extends NotificationListenerService {
GBApplication.deviceService().onSetMusicState(stateSpec);
}
};
}
mHandler.postDelayed(mSetMusicStateRunnable, 100);
return true;