From 8d145917f59259340bb55cd8a334fc9c88e7b962 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Tue, 19 May 2020 23:06:05 +0800 Subject: [PATCH] Huami: Use equals to compare musicspec/statespec --- .../gadgetbridge/service/devices/huami/HuamiSupport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java index da2309f27..810d36c5d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiSupport.java @@ -805,7 +805,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport { return; } - if (bufferMusicStateSpec != stateSpec) { + if (!stateSpec.equals(bufferMusicStateSpec)) { bufferMusicStateSpec = stateSpec; sendMusicStateToDevice(); } @@ -819,7 +819,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport { return; } - if (bufferMusicSpec != musicSpec) { + if (!musicSpec.equals(bufferMusicSpec)) { bufferMusicSpec = musicSpec; if (isMusicAppStarted) { sendMusicStateToDevice();