diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index f9fee6cce..852c738a5 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -439,7 +439,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag public void subscribeFriendList(boolean enabled){ LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); - if(lc != null ) { + if(lc != null && lc.getFriendList() != null && lc.getFriendList().length > 0) { LinphoneFriendList mFriendList = (lc.getFriendLists())[0]; Log.i("Presence list subscription is " + (enabled ? "enabled" : "disabled")); mFriendList.enableSubscriptions(enabled); diff --git a/src/org/linphone/assistant/CreateAccountFragment.java b/src/org/linphone/assistant/CreateAccountFragment.java index a0231cd98..3c6b1768e 100644 --- a/src/org/linphone/assistant/CreateAccountFragment.java +++ b/src/org/linphone/assistant/CreateAccountFragment.java @@ -453,6 +453,7 @@ public class CreateAccountFragment extends Fragment implements CompoundButton.On dialCode.setBackgroundResource(R.drawable.resizable_textfield); phoneNumberEdit.setBackgroundResource(R.drawable.resizable_textfield_error); } + } else { dialCode.setBackgroundResource(R.drawable.resizable_textfield); phoneNumberEdit.setBackgroundResource(R.drawable.resizable_textfield); @@ -679,7 +680,8 @@ public class CreateAccountFragment extends Fragment implements CompoundButton.On @Override public void onAccountCreatorIsPhoneNumberUsed(LinphoneAccountCreator ac, Status status) { if (status.equals(Status.PhoneNumberUsedAccount) || status.equals(Status.PhoneNumberUsedAlias)) { - if (accountCreator.getPhoneNumber().compareTo(accountCreator.getUsername()) == 0) { + if (accountCreator.getPhoneNumber() != null && accountCreator.getUsername() != null + && accountCreator.getPhoneNumber().compareTo(accountCreator.getUsername()) == 0) { accountCreator.isAccountActivated(); } else { createAccount.setEnabled(true);