Amazfit Bip S: Fix crash with notifictions with only a title (GitNex does this)

Probably affects other newer Huami devices
This commit is contained in:
Andreas Shimokawa 2020-12-02 17:07:40 +01:00
parent c7f75c3dc3
commit d0c5ffec28

@ -645,6 +645,9 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
if (notificationSpec.body != null) {
message += StringUtils.truncate(notificationSpec.body, 512);
}
if (notificationSpec.body == null && notificationSpec.subject == null) {
message += " "; // if we have no body we have to send at least something on some devices, else they reboot (Bip S)
}
try {
TransactionBuilder builder = performInitialized("new notification");