Little fix on Assistant

This commit is contained in:
Erwan Croze 2016-10-28 13:47:38 +02:00
parent 634c4037f6
commit 6bd08dbf39
2 changed files with 4 additions and 2 deletions

View file

@ -439,7 +439,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
public void subscribeFriendList(boolean enabled){ public void subscribeFriendList(boolean enabled){
LinphoneCore lc = getLcIfManagerNotDestroyedOrNull(); LinphoneCore lc = getLcIfManagerNotDestroyedOrNull();
if(lc != null ) { if(lc != null && lc.getFriendList() != null && lc.getFriendList().length > 0) {
LinphoneFriendList mFriendList = (lc.getFriendLists())[0]; LinphoneFriendList mFriendList = (lc.getFriendLists())[0];
Log.i("Presence list subscription is " + (enabled ? "enabled" : "disabled")); Log.i("Presence list subscription is " + (enabled ? "enabled" : "disabled"));
mFriendList.enableSubscriptions(enabled); mFriendList.enableSubscriptions(enabled);

View file

@ -453,6 +453,7 @@ public class CreateAccountFragment extends Fragment implements CompoundButton.On
dialCode.setBackgroundResource(R.drawable.resizable_textfield); dialCode.setBackgroundResource(R.drawable.resizable_textfield);
phoneNumberEdit.setBackgroundResource(R.drawable.resizable_textfield_error); phoneNumberEdit.setBackgroundResource(R.drawable.resizable_textfield_error);
} }
} else { } else {
dialCode.setBackgroundResource(R.drawable.resizable_textfield); dialCode.setBackgroundResource(R.drawable.resizable_textfield);
phoneNumberEdit.setBackgroundResource(R.drawable.resizable_textfield); phoneNumberEdit.setBackgroundResource(R.drawable.resizable_textfield);
@ -679,7 +680,8 @@ public class CreateAccountFragment extends Fragment implements CompoundButton.On
@Override @Override
public void onAccountCreatorIsPhoneNumberUsed(LinphoneAccountCreator ac, Status status) { public void onAccountCreatorIsPhoneNumberUsed(LinphoneAccountCreator ac, Status status) {
if (status.equals(Status.PhoneNumberUsedAccount) || status.equals(Status.PhoneNumberUsedAlias)) { 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(); accountCreator.isAccountActivated();
} else { } else {
createAccount.setEnabled(true); createAccount.setEnabled(true);