Revert previous commit causing FC on contacts
This commit is contained in:
parent
a1bedb2b63
commit
a33ab34bd4
2 changed files with 41 additions and 26 deletions
|
@ -128,9 +128,10 @@ public class IncomingCallActivity extends Activity implements LinphoneOnCallStat
|
||||||
private void decline() {
|
private void decline() {
|
||||||
LinphoneManager.getLc().terminateCall(mCall);
|
LinphoneManager.getLc().terminateCall(mCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void answer() {
|
private void answer() {
|
||||||
LinphoneCallParams params = LinphoneManager.getLc().createDefaultCallParameters();
|
LinphoneCallParams params = LinphoneManager.getLc().createDefaultCallParameters();
|
||||||
if (mCall.getRemoteParams().getVideoEnabled() && LinphoneManager.getInstance().isAutoAcceptCamera()) {
|
if (mCall != null && mCall.getRemoteParams().getVideoEnabled() && LinphoneManager.getInstance().isAutoAcceptCamera()) {
|
||||||
params.setVideoEnabled(true);
|
params.setVideoEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
params.setVideoEnabled(false);
|
params.setVideoEnabled(false);
|
||||||
|
|
|
@ -1051,33 +1051,47 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
||||||
|
|
||||||
contactCursor = Compatibility.getContactsCursor(getContentResolver());
|
contactCursor = Compatibility.getContactsCursor(getContentResolver());
|
||||||
sipContactCursor = Compatibility.getSIPContactsCursor(getContentResolver());
|
sipContactCursor = Compatibility.getSIPContactsCursor(getContentResolver());
|
||||||
if (contactCursor != null && sipContactCursor != null) {
|
|
||||||
contactList = new ArrayList<Contact>();
|
|
||||||
sipContactList = new ArrayList<Contact>();
|
|
||||||
|
|
||||||
Thread contactsHandler = new Thread(new Runnable() {
|
Thread sipContactsHandler = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (int i = 0; i < contactCursor.getCount(); i++) {
|
for (int i = 0; i < sipContactCursor.getCount(); i++) {
|
||||||
Contact contact = Compatibility.getContact(getContentResolver(), contactCursor, i);
|
Contact contact = Compatibility.getContact(getContentResolver(), sipContactCursor, i);
|
||||||
contact.refresh(getContentResolver());
|
contact.refresh(getContentResolver());
|
||||||
|
if (getResources().getBoolean(R.bool.enable_linphone_friends)) {
|
||||||
for (String aon : contact.getNumerosOrAddresses()) {
|
searchFriendAndAddToContact(contact);
|
||||||
if (LinphoneUtils.isSipAddress(aon)) {
|
|
||||||
if (!isContactPresenceDisabled) {
|
|
||||||
searchFriendAndAddToContact(contact);
|
|
||||||
}
|
|
||||||
if (!sipContactList.contains(contact)) {
|
|
||||||
sipContactList.add(contact);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
contactList.add(contact);
|
|
||||||
}
|
}
|
||||||
|
sipContactList.add(contact);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
contactsHandler.start();
|
});
|
||||||
}
|
sipContactsHandler.start();
|
||||||
|
|
||||||
|
contactList = new ArrayList<Contact>();
|
||||||
|
sipContactList = new ArrayList<Contact>();
|
||||||
|
|
||||||
|
Thread contactsHandler = new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
for (int i = 0; i < contactCursor.getCount(); i++) {
|
||||||
|
Contact contact = Compatibility.getContact(getContentResolver(), contactCursor, i);
|
||||||
|
// contact.refresh(getContentResolver());
|
||||||
|
//
|
||||||
|
// for (String aon : contact.getNumerosOrAddresses()) {
|
||||||
|
// if (LinphoneUtils.isSipAddress(aon)) {
|
||||||
|
// if (!isContactPresenceDisabled) {
|
||||||
|
// searchFriendAndAddToContact(contact);
|
||||||
|
// }
|
||||||
|
// if (!sipContactList.contains(contact)) {
|
||||||
|
// sipContactList.add(contact);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
contactList.add(contact);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
contactsHandler.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initInCallMenuLayout(boolean callTransfer) {
|
private void initInCallMenuLayout(boolean callTransfer) {
|
||||||
|
|
Loading…
Reference in a new issue