1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-30 20:45:49 +01:00

Amazfit Cor: only send music information when needed

This commit is contained in:
Daniele Gobbetti 2018-08-08 17:48:23 +02:00
parent da58e22afe
commit 797a671ccd

View File

@ -741,9 +741,9 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
if (bufferMusicStateSpec != stateSpec) { if (bufferMusicStateSpec != stateSpec) {
bufferMusicStateSpec = stateSpec; bufferMusicStateSpec = stateSpec;
sendMusicStateToDevice();
} }
sendMusicStateToDevice();
} }
@Override @Override
@ -755,12 +755,11 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
if (bufferMusicSpec != musicSpec) { if (bufferMusicSpec != musicSpec) {
bufferMusicSpec = musicSpec; bufferMusicSpec = musicSpec;
if (isMusicAppStarted) {
sendMusicStateToDevice();
}
} }
if (!isMusicAppStarted) {
return;
}
sendMusicStateToDevice();
} }