mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 01:21: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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stateSpec.equals(bufferMusicStateSpec)) {
|
if (stateSpec != null && !stateSpec.equals(bufferMusicStateSpec)) {
|
||||||
bufferMusicStateSpec = stateSpec;
|
bufferMusicStateSpec = stateSpec;
|
||||||
sendMusicStateToDevice();
|
sendMusicStateToDevice();
|
||||||
}
|
}
|
||||||
@ -819,7 +819,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!musicSpec.equals(bufferMusicSpec)) {
|
if (musicSpec != null && !musicSpec.equals(bufferMusicSpec)) {
|
||||||
bufferMusicSpec = musicSpec;
|
bufferMusicSpec = musicSpec;
|
||||||
if (isMusicAppStarted) {
|
if (isMusicAppStarted) {
|
||||||
sendMusicStateToDevice();
|
sendMusicStateToDevice();
|
||||||
|
Loading…
Reference in New Issue
Block a user