From 3fcdffb91966e71eeae73cbd328f9a99a2897f57 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Sun, 26 Mar 2017 09:13:06 -0400 Subject: [PATCH] Only enforce CallKit privacy for missed calls if CallKit is present. // FREEBIE --- Signal/src/environment/NotificationsManager.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Signal/src/environment/NotificationsManager.m b/Signal/src/environment/NotificationsManager.m index bc47f6d4f..097ace713 100644 --- a/Signal/src/environment/NotificationsManager.m +++ b/Signal/src/environment/NotificationsManager.m @@ -68,7 +68,8 @@ case NotificationNameNoPreview: { notification.userInfo = @{ Signal_Call_UserInfo_Key : cThread.contactIdentifier }; notification.category = Signal_CallBack_Category; - notification.alertBody = ([[Environment getCurrent].preferences isCallKitPrivacyEnabled] + notification.alertBody = (([UIDevice currentDevice].supportsCallKit && + [[Environment getCurrent].preferences isCallKitPrivacyEnabled]) ? [CallStrings missedCallNotificationBodyWithoutCallerName] : [NSString stringWithFormat:[CallStrings missedCallNotificationBodyWithCallerName], [thread name]]); break; @@ -136,7 +137,8 @@ } case NotificationNameNoPreview: case NotificationNamePreview: { - alertMessage = ([[Environment getCurrent].preferences isCallKitPrivacyEnabled] + alertMessage = (([UIDevice currentDevice].supportsCallKit && + [[Environment getCurrent].preferences isCallKitPrivacyEnabled]) ? [CallStrings missedCallNotificationBodyWithoutCallerName] : [NSString stringWithFormat:[CallStrings missedCallNotificationBodyWithCallerName], callerName]); break;