Updated linphone + small UI fix if no account is configured
This commit is contained in:
parent
2398f6cede
commit
e0463529ea
3 changed files with 8 additions and 5 deletions
|
@ -38,6 +38,7 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import org.linphone.LinphoneManager;
|
import org.linphone.LinphoneManager;
|
||||||
import org.linphone.contacts.ContactAddress;
|
import org.linphone.contacts.ContactAddress;
|
||||||
|
import org.linphone.contacts.ContactsManager;
|
||||||
import org.linphone.contacts.SearchContactsListAdapter;
|
import org.linphone.contacts.SearchContactsListAdapter;
|
||||||
import org.linphone.core.Address;
|
import org.linphone.core.Address;
|
||||||
import org.linphone.core.ChatRoom;
|
import org.linphone.core.ChatRoom;
|
||||||
|
@ -151,7 +152,7 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
|
||||||
updateListSelected();
|
updateListSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
mOnlyDisplayLinphoneContacts = true;
|
mOnlyDisplayLinphoneContacts = ContactsManager.getInstance().getSIPContacts().size() > 0 ? true : false;
|
||||||
if (savedInstanceState != null ) {
|
if (savedInstanceState != null ) {
|
||||||
mOnlyDisplayLinphoneContacts = savedInstanceState.getBoolean("onlySipContact", true);
|
mOnlyDisplayLinphoneContacts = savedInstanceState.getBoolean("onlySipContact", true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,10 +119,12 @@ public class SearchContactsListAdapter extends BaseAdapter {
|
||||||
List<LinphoneContact> contacts = mOnlySipContact ? ContactsManager.getInstance().getSIPContacts() : ContactsManager.getInstance().getContacts();
|
List<LinphoneContact> contacts = mOnlySipContact ? ContactsManager.getInstance().getSIPContacts() : ContactsManager.getInstance().getContacts();
|
||||||
for (LinphoneContact contact : contacts) {
|
for (LinphoneContact contact : contacts) {
|
||||||
for (LinphoneNumberOrAddress noa : contact.getNumbersOrAddresses()) {
|
for (LinphoneNumberOrAddress noa : contact.getNumbersOrAddresses()) {
|
||||||
if (!mOnlySipContact || (mOnlySipContact && contact.getPresenceModelForUriOrTel(noa.getValue()) != null)) {
|
if (!mOnlySipContact || (mOnlySipContact && (noa.isSIPAddress() || contact.getPresenceModelForUriOrTel(noa.getValue()) != null))) {
|
||||||
Address address = LinphoneManager.getLc().interpretUrl(noa.getValue());
|
Address address = LinphoneManager.getLc().interpretUrl(noa.getValue());
|
||||||
ContactAddress ca = new ContactAddress(contact, address.asString(), contact.isFriend());
|
if (address != null) {
|
||||||
list.add(ca);
|
ContactAddress ca = new ContactAddress(contact, address.asString(), contact.isFriend());
|
||||||
|
list.add(ca);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit cb45d54d1af48202019f2ea47a326938d9596b58
|
Subproject commit c300e10f142cb3e8e70a99dc3c94aff584a7ea26
|
Loading…
Reference in a new issue