mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Solve the PR #1004, Can't answer call from lock screen if app is in background and we slide the bottom of the lockscreen (not the push)
What was happening: we would land into the dialer view, but with an incoming call in BG, which would confuse the UI.
This commit is contained in:
parent
0b98741087
commit
03dfd7fc7b
2 changed files with 8 additions and 5 deletions
|
|
@ -92,15 +92,15 @@
|
|||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"applicationDidBecomeActive"];
|
||||
[self startApplication];
|
||||
|
||||
[[LinphoneManager instance] becomeActive];
|
||||
LinphoneManager* instance = [LinphoneManager instance];
|
||||
|
||||
[instance becomeActive];
|
||||
|
||||
|
||||
LinphoneCore* lc = [LinphoneManager getLc];
|
||||
LinphoneCall* call = linphone_core_get_current_call(lc);
|
||||
|
||||
if (call){
|
||||
LinphoneManager* instance = [LinphoneManager instance];
|
||||
if (call == instance->currentCallContextBeforeGoingBackground.call) {
|
||||
const LinphoneCallParams* params = linphone_call_get_current_params(call);
|
||||
if (linphone_call_params_video_enabled(params)) {
|
||||
|
|
@ -109,7 +109,9 @@
|
|||
instance->currentCallContextBeforeGoingBackground.cameraIsEnabled);
|
||||
}
|
||||
instance->currentCallContextBeforeGoingBackground.call = 0;
|
||||
}
|
||||
} else {
|
||||
[[PhoneMainView instance ] displayIncomingCall:call];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +177,7 @@
|
|||
[self startApplication];
|
||||
if([LinphoneManager isLcReady]) {
|
||||
if([[url scheme] isEqualToString:@"sip"]) {
|
||||
// Go to ChatRoom view
|
||||
// Go to Dialer view
|
||||
DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController);
|
||||
if(controller != nil) {
|
||||
[controller setAddress:[url absoluteString]];
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
- (void)fullScreen:(BOOL)enabled;
|
||||
- (void)updateStatusBar:(UICompositeViewDescription*)to_view;
|
||||
- (void)startUp;
|
||||
- (void)displayIncomingCall:(LinphoneCall*) call;
|
||||
|
||||
- (void)addInhibitedEvent:(id)event;
|
||||
- (BOOL)removeInhibitedEvent:(id)event;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue