mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
LocalNotification: add settings Call "Repeat call notification" so that in iOS8, user can choose local notification behaviour based on its use case (vibrate at each notification or not)
This commit is contained in:
parent
b5a777a679
commit
9b6ae065b5
4 changed files with 22 additions and 3 deletions
|
|
@ -242,6 +242,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
|
||||
[self setInteger:linphone_core_get_inc_timeout(lc) forKey:@"incoming_call_timeout_preference"];
|
||||
[self setInteger:linphone_core_get_in_call_timeout(lc) forKey:@"in_call_timeout_preference"];
|
||||
|
||||
[self setBool:[lm lpConfigBoolForKey:@"repeat_call_notification"]
|
||||
forKey:@"repeat_call_notification_preference"];
|
||||
}
|
||||
|
||||
// network section
|
||||
|
|
@ -644,8 +647,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
linphone_core_set_use_info_for_dtmf(lc, [self boolForKey:@"sipinfo_dtmf_preference"]);
|
||||
linphone_core_set_inc_timeout(lc, [self integerForKey:@"incoming_call_timeout_preference"]);
|
||||
linphone_core_set_in_call_timeout(lc, [self integerForKey:@"in_call_timeout_preference"]);
|
||||
[[LinphoneManager instance] lpConfigSetString:[self stringForKey:@"voice_mail_uri_preference"]
|
||||
forKey:@"voice_mail_uri"];
|
||||
[lm lpConfigSetString:[self stringForKey:@"voice_mail_uri_preference"] forKey:@"voice_mail_uri"];
|
||||
[lm lpConfigSetBool:[self boolForKey:@"repeat_call_notification_preference"]
|
||||
forKey:@"repeat_call_notification"];
|
||||
}
|
||||
|
||||
// network section
|
||||
|
|
|
|||
|
|
@ -642,7 +642,8 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
if (data->notification) {
|
||||
|
||||
// iOS8 doesn't need the timer trick for the local notification.
|
||||
if( [[UIDevice currentDevice].systemVersion floatValue] >= 8){
|
||||
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8 &&
|
||||
[self lpConfigBoolForKey:@"repeat_call_notification"] == NO) {
|
||||
data->notification.soundName = @"ring.caf";
|
||||
data->notification.category = @"incoming_call";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -680,6 +680,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[hiddenKeys addObject:@"in_app_products_button"];
|
||||
}
|
||||
|
||||
if ([[UIDevice currentDevice].systemVersion floatValue] < 8) {
|
||||
[hiddenKeys addObject:@"repeat_call_notification_preference"];
|
||||
}
|
||||
|
||||
return hiddenKeys;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,16 @@
|
|||
<key>IASKTextAlignment</key>
|
||||
<string>IASKUITextAlignmentRight</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
<string>repeat_call_notification_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Repeat call notification</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue