remove useless code

This commit is contained in:
Danmei Chen 2020-04-17 11:54:43 +02:00
parent f249caf0c6
commit a35eaf8217
2 changed files with 0 additions and 25 deletions

View file

@ -117,15 +117,6 @@ import AVFoundation
return false
}
@objc static func incomingCallMustBeDisplayed() -> Bool {
if #available(iOS 13.0, *) {
if UIApplication.shared.applicationState == .background && CallManager.callKitEnabled() && CallManager.instance().lc?.callsNb ?? 0 < 2 {
return true
}
}
return false
}
@objc func allowSpeaker() -> Bool {
if (UIDevice.current.userInterfaceIdiom == .pad) {
// For now, ipad support only speaker.

View file

@ -363,22 +363,6 @@ static RootViewManager *rootViewManagerInstance = nil;
case LinphoneCallIncomingReceived:
if (!CallManager.callKitEnabled) {
[self displayIncomingCall:call];
} else if(@available(iOS 13.0, *)) {
if ([LinphoneManager.instance lpConfigIntForKey:@"unexpected_pushkit" withDefault:0] > 3) {
dispatch_async(dispatch_get_main_queue(), ^{
linphone_call_decline(call, LinphoneReasonUnknown);
UIAlertController *errView =
[UIAlertController alertControllerWithTitle:NSLocalizedString(@"Push token for calls is not valid anymore", nil)
message:NSLocalizedString(@"Please delete all of your accounts from the server.", nil)
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {}];
[errView addAction:defaultAction];
[self presentViewController:errView animated:YES completion:nil];});
}
}
break;
case LinphoneCallIncomingEarlyMedia: {