mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 09:01:55 +01:00
Fix crash when receiving empty music state
This commit is contained in:
parent
145c2b8c6c
commit
8aaa766dcd
@ -700,15 +700,17 @@ public class NotificationListener extends NotificationListenerService {
|
||||
};
|
||||
mHandler.postDelayed(mSetMusicInfoRunnable, 100);
|
||||
|
||||
if (mSetMusicStateRunnable != null) {
|
||||
mHandler.removeCallbacks(mSetMusicStateRunnable);
|
||||
}
|
||||
mSetMusicStateRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GBApplication.deviceService().onSetMusicState(stateSpec);
|
||||
if (stateSpec != null) {
|
||||
if (mSetMusicStateRunnable != null) {
|
||||
mHandler.removeCallbacks(mSetMusicStateRunnable);
|
||||
}
|
||||
};
|
||||
mSetMusicStateRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GBApplication.deviceService().onSetMusicState(stateSpec);
|
||||
}
|
||||
};
|
||||
}
|
||||
mHandler.postDelayed(mSetMusicStateRunnable, 100);
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user