mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Amazfit Bip S: Attempt to fix reboot on notification without title
This commit is contained in:
+4
-1
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user