Avoid crash if linphone core is not currently set
This commit is contained in:
parent
1398265662
commit
7051daa9cb
1 changed files with 100 additions and 97 deletions
|
@ -246,8 +246,11 @@ public class LinphoneManager implements LinphoneCoreListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPresenceModelActivitySet() {
|
private boolean isPresenceModelActivitySet() {
|
||||||
|
if (isInstanciated() && getLcIfManagerNotDestroyedOrNull() != null) {
|
||||||
return getLc().getPresenceModel() != null || getLc().getPresenceModel().getActivity() != null;
|
return getLc().getPresenceModel() != null || getLc().getPresenceModel().getActivity() != null;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void changeStatusToOnline() {
|
public void changeStatusToOnline() {
|
||||||
if (isInstanciated() && getLcIfManagerNotDestroyedOrNull() != null && isPresenceModelActivitySet() && getLc().getPresenceModel().getActivity().getType() != PresenceActivityType.Online) {
|
if (isInstanciated() && getLcIfManagerNotDestroyedOrNull() != null && isPresenceModelActivitySet() && getLc().getPresenceModel().getActivity().getType() != PresenceActivityType.Online) {
|
||||||
|
|
Loading…
Reference in a new issue