Fixing somes crashs on Android < 5.1 with downloading of OpenH264

This commit is contained in:
Erwan Croze 2017-01-04 16:53:15 +01:00
parent 429576bc9d
commit 47a488738a
2 changed files with 6 additions and 3 deletions

View file

@ -257,7 +257,7 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
}
};
int missedCalls = LinphoneManager.getLc().getMissedCallsCount();
int missedCalls = (LinphoneManager.getInstance() != null) ? LinphoneManager.getLc().getMissedCallsCount() : 0;
displayMissedCalls(missedCalls);
int rotation = getWindowManager().getDefaultDisplay().getRotation();
@ -276,7 +276,9 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
break;
}
LinphoneManager.getLc().setDeviceRotation(rotation);
if (LinphoneManager.getInstance() != null) {
LinphoneManager.getLc().setDeviceRotation(rotation);
}
mAlwaysChangingPhoneAngle = rotation;
}

View file

@ -1269,7 +1269,8 @@ public class LinphonePreferences {
// End of tunnel settings
public boolean isProvisioningLoginViewEnabled() {
return getConfig().getBool("app", "show_login_view", false);
return (getConfig() != null) ? getConfig().getBool("app", "show_login_view", false) : false;
}
public void disableProvisioningLoginView() {