mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Huami: Check if musicSpec/stateSpec is null
This commit is contained in:
parent
16baf97083
commit
c0558c570c
@ -805,7 +805,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!stateSpec.equals(bufferMusicStateSpec)) {
|
||||
if (stateSpec != null && !stateSpec.equals(bufferMusicStateSpec)) {
|
||||
bufferMusicStateSpec = stateSpec;
|
||||
sendMusicStateToDevice();
|
||||
}
|
||||
@ -819,7 +819,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!musicSpec.equals(bufferMusicSpec)) {
|
||||
if (musicSpec != null && !musicSpec.equals(bufferMusicSpec)) {
|
||||
bufferMusicSpec = musicSpec;
|
||||
if (isMusicAppStarted) {
|
||||
sendMusicStateToDevice();
|
||||
|
Loading…
Reference in New Issue
Block a user