From 0107ea2079e45f300d253304ef6c66f8675f5bd8 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Wed, 19 Jun 2019 11:52:46 +0200 Subject: [PATCH] add parameter of settings to enable media encryption mandatory --- Classes/LinphoneCoreSettingsStore.m | 2 ++ Settings/InAppSettings.bundle/Call.plist | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index 614a3681f..6b9679e71 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -330,6 +330,7 @@ [self setBool:[lm lpConfigBoolForKey:@"repeat_call_notification"] forKey:@"repeat_call_notification_preference"]; + [self setBool:linphone_core_is_media_encryption_mandatory(LC) forKey:@"media_encrption_mandatory_preference"]; [self setBool:[lm lpConfigBoolForKey:@"pref_accept_early_media"] forKey:@"pref_accept_early_media_preference"]; } @@ -770,6 +771,7 @@ [lm lpConfigSetString:[self stringForKey:@"voice_mail_uri_preference"] forKey:@"voice_mail_uri"]; [lm lpConfigSetBool:[self boolForKey:@"repeat_call_notification_preference"] forKey:@"repeat_call_notification"]; [lm lpConfigSetBool:[self boolForKey:@"pref_accept_early_media_preference"] forKey:@"pref_accept_early_media"]; + linphone_core_set_media_encryption_mandatory(LC, [self boolForKey:@"media_encrption_mandatory_preference"]); // chat section int val = [self integerForKey:@"use_lime_preference"]; diff --git a/Settings/InAppSettings.bundle/Call.plist b/Settings/InAppSettings.bundle/Call.plist index 8438e369e..abd10a652 100644 --- a/Settings/InAppSettings.bundle/Call.plist +++ b/Settings/InAppSettings.bundle/Call.plist @@ -88,6 +88,16 @@ Type PSToggleSwitchSpecifier + + DefaultValue + + Key + media_encrption_mandatory_preference + Title + Media encryption mandatory + Type + PSToggleSwitchSpecifier + DefaultValue