Fix contact small issues
This commit is contained in:
parent
473311187f
commit
a3b9b544e6
3 changed files with 12 additions and 8 deletions
|
@ -154,11 +154,15 @@ public final class ContactHelper {
|
|||
}
|
||||
String[] projection = {android.provider.ContactsContract.CommonDataKinds.Photo.PHOTO};
|
||||
Cursor photoCursor = resolver.query(photoUri, projection, null, null, null);
|
||||
boolean valid = testPhotoUriAndCloseCursor(photoCursor);
|
||||
if (valid) {
|
||||
String maybeDisplayName = c.getString(c.getColumnIndex(nameCol));
|
||||
boolean isPhotoValid = testPhotoUriAndCloseCursor(photoCursor);
|
||||
if (isPhotoValid) {
|
||||
foundPhotoUri = photoUri;
|
||||
displayName = c.getString(c.getColumnIndex(nameCol));
|
||||
c.close();
|
||||
displayName = maybeDisplayName;
|
||||
return true;
|
||||
} else if (maybeDisplayName != null) {
|
||||
foundPhotoUri = null;
|
||||
displayName = maybeDisplayName;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.linphone.core.LinphoneCore;
|
|||
import org.linphone.core.LinphoneCore.MediaEncryption;
|
||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||
import org.linphone.core.LinphoneProxyConfig;
|
||||
import org.linphone.core.Log;
|
||||
import org.linphone.ui.SlidingDrawer;
|
||||
import org.linphone.ui.SlidingDrawer.OnDrawerOpenListener;
|
||||
|
||||
|
@ -323,9 +322,6 @@ public class StatusFragment extends Fragment {
|
|||
}
|
||||
encryption.setVisibility(View.VISIBLE);
|
||||
|
||||
Log.e("MediaEncryption = " + mediaEncryption);
|
||||
Log.e("TokenVerified = " + call.isAuthenticationTokenVerified());
|
||||
|
||||
if (mediaEncryption == MediaEncryption.SRTP || (mediaEncryption == MediaEncryption.ZRTP && call.isAuthenticationTokenVerified())) {
|
||||
encryption.setImageResource(R.drawable.security_ok);
|
||||
} else if (mediaEncryption == MediaEncryption.ZRTP && !call.isAuthenticationTokenVerified()) {
|
||||
|
|
|
@ -67,6 +67,10 @@ public class ApiFivePlus {
|
|||
intent.putExtra(ContactsContract.Intents.Insert.NAME, displayName);
|
||||
|
||||
if (Version.sdkAboveOrEqual(Version.API09_GINGERBREAD_23)) {
|
||||
if (sipUri.startsWith("sip:")) {
|
||||
sipUri = sipUri.substring(4);
|
||||
}
|
||||
|
||||
ArrayList<ContentValues> data = new ArrayList<ContentValues>();
|
||||
ContentValues sipAddressRow = new ContentValues();
|
||||
sipAddressRow.put(Contacts.Data.MIMETYPE, SipAddress.CONTENT_ITEM_TYPE);
|
||||
|
|
Loading…
Reference in a new issue