Merge branch 'conference' of git.linphone.org:linphone-iphone into conference

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2011-11-18 17:17:32 +01:00
commit 32dd2dc423
2 changed files with 4 additions and 2 deletions

View file

@ -144,7 +144,8 @@
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
LinphoneCall* call = (LinphoneCall*)[notification.userInfo objectForKey:@"call"];
LinphoneCall* call;
[(NSData*)([notification.userInfo objectForKey:@"call"]) getBytes:&call];
if (!call) {
ms_warning("Local notification received with nil call");
return;

View file

@ -247,7 +247,8 @@
notif.alertBody =[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username];
notif.alertAction = @"Answer";
notif.soundName = @"oldphone-mono-30s.caf";
notif.userInfo = [NSDictionary dictionaryWithObject:call forKey:"call"];
NSData *callData = [NSData dataWithBytes:&call length:sizeof(call)];
notif.userInfo = [NSDictionary dictionaryWithObject:callData forKey:@"call"];
[[UIApplication sharedApplication] presentLocalNotificationNow:notif];
}