mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 02:09:22 +00:00
Do not show error popups when going into background mode
This commit is contained in:
parent
cf7c9add27
commit
09b86701ba
1 changed files with 8 additions and 3 deletions
|
|
@ -349,13 +349,17 @@ static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, Lin
|
|||
if (lErrorMessage != nil
|
||||
&& linphone_proxy_config_get_error(cfg) != LinphoneReasonNoResponse) { //do not report network connection issue on registration
|
||||
//default behavior if no registration delegates
|
||||
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Registration failure",nil)
|
||||
UIApplicationState s = [UIApplication sharedApplication].applicationState;
|
||||
|
||||
// do not stack error message when going to backgroud
|
||||
if (s != UIApplicationStateBackground) {
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Registration failure",nil)
|
||||
message:lErrorMessage
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[error show];
|
||||
[error show];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -469,6 +473,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
int i=0;
|
||||
while (linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationNone &&
|
||||
linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationCleared &&
|
||||
linphone_proxy_config_get_state(proxyCfg)!=LinphoneRegistrationFailed &&
|
||||
i++<40 ) {
|
||||
linphone_core_iterate(theLinphoneCore);
|
||||
usleep(100000);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue