Amazfit Bip S: Attempt to fix reboot on notification without title

This commit is contained in:
José Rebelo
2026-04-18 09:30:08 +01:00
parent d5a8fee6e6
commit b73077a566
@@ -894,7 +894,10 @@ public abstract class HuamiSupport extends AbstractBTLESingleDeviceSupport
*/
public String getNotificationBody(NotificationSpec notificationSpec) {
String senderOrTitle = StringUtils.getFirstOf(notificationSpec.sender, notificationSpec.title);
if (senderOrTitle.isEmpty()) {
// if we have no title we have to send at least something on some devices, else they reboot (Bip S)
senderOrTitle = " ";
}
String message = StringUtils.truncate(senderOrTitle, 32) + "\0";
if (notificationSpec.subject != null) {
message += StringUtils.truncate(notificationSpec.subject, 128) + "\n\n";