mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-05 22:15:54 +02:00
Fix crash when receiving empty music state
This commit is contained in:
parent
145c2b8c6c
commit
8aaa766dcd
@ -700,6 +700,7 @@ public class NotificationListener extends NotificationListenerService {
|
|||||||
};
|
};
|
||||||
mHandler.postDelayed(mSetMusicInfoRunnable, 100);
|
mHandler.postDelayed(mSetMusicInfoRunnable, 100);
|
||||||
|
|
||||||
|
if (stateSpec != null) {
|
||||||
if (mSetMusicStateRunnable != null) {
|
if (mSetMusicStateRunnable != null) {
|
||||||
mHandler.removeCallbacks(mSetMusicStateRunnable);
|
mHandler.removeCallbacks(mSetMusicStateRunnable);
|
||||||
}
|
}
|
||||||
@ -709,6 +710,7 @@ public class NotificationListener extends NotificationListenerService {
|
|||||||
GBApplication.deviceService().onSetMusicState(stateSpec);
|
GBApplication.deviceService().onSetMusicState(stateSpec);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}
|
||||||
mHandler.postDelayed(mSetMusicStateRunnable, 100);
|
mHandler.postDelayed(mSetMusicStateRunnable, 100);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user