From b18ec22f82c80a3eebf857d2e5e7ccbff8cf88bb Mon Sep 17 00:00:00 2001 From: l3d00m Date: Mon, 19 Oct 2015 20:05:17 +0200 Subject: [PATCH] fix a bug where sender wasn't hidden now for real --- .../moez/QKSMS/transaction/NotificationManager.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/QKSMS/src/main/java/com/moez/QKSMS/transaction/NotificationManager.java b/QKSMS/src/main/java/com/moez/QKSMS/transaction/NotificationManager.java index 58cbafa7..00d99064 100644 --- a/QKSMS/src/main/java/com/moez/QKSMS/transaction/NotificationManager.java +++ b/QKSMS/src/main/java/com/moez/QKSMS/transaction/NotificationManager.java @@ -577,17 +577,18 @@ public class NotificationManager { inboxStyle.addLine(message1.mBody); } - NotificationCompat.Style stylen; - if (privateNotifications == 0) stylen = inboxStyle; - else stylen = null; + String notificationTitle = message.mContact; + + if (!(privateNotifications == 0)) inboxStyle = null; + if (privateNotifications == 2) notificationTitle = "QKSMS"; int unreadMessageCount = SmsHelper.getUnreadMessageCount(context); - builder.setContentTitle("QKSMS") + builder.setContentTitle(notificationTitle) .setContentText(SmsHelper.getUnseenSMSCount(context, threadId) + " " + sRes.getString(R.string.new_messages)) .setLargeIcon(getLargeIcon(context, Contact.get(message.mAddress, false), privateNotifications)) .setContentIntent(threadPI) .setNumber(unreadMessageCount) - .setStyle(stylen) + .setStyle(inboxStyle) .addAction(R.drawable.ic_reply, sRes.getString(R.string.reply), replyPI) .addAction(R.drawable.ic_accept, sRes.getString(R.string.read), readPI) .extend(WearableIntentReceiver.getSingleConversationExtender(context, message.mContact, message.mAddress, threadId))