mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
Update app
This commit is contained in:
parent
a230b2ed13
commit
e49bc31cc6
10 changed files with 40 additions and 17 deletions
|
|
@ -250,6 +250,7 @@ java-clean:
|
|||
|
||||
|
||||
copy-libs:
|
||||
\trm -rf liblinphone-sdk/res
|
||||
\trm -rf libs-debug/armeabi
|
||||
\trm -rf libs/armeabi
|
||||
\tif test -d "liblinphone-sdk/android-arm"; then \\
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ import org.linphone.core.LogCollectionState;
|
|||
import org.linphone.core.LogLevel;
|
||||
import org.linphone.core.LoggingService;
|
||||
import org.linphone.core.LoggingServiceListener;
|
||||
import org.linphone.core.Participant;
|
||||
import org.linphone.core.ProxyConfig;
|
||||
import org.linphone.core.RegistrationState;
|
||||
import org.linphone.mediastream.Log;
|
||||
|
|
@ -906,10 +907,17 @@ public final class LinphoneUtils {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static ChatRoomSecurityLevel getSecurityLevelForSipUri(Core lc, String sipUri) {
|
||||
ChatRoom cr = lc.getChatRoomFromUri(sipUri);
|
||||
public static ChatRoomSecurityLevel getSecurityLevelForSipUri(Core lc, Address ourUri, Address sipUri) {
|
||||
if (ourUri == null || sipUri == null) return ChatRoomSecurityLevel.ClearText;
|
||||
|
||||
for (ChatRoom cr : lc.getChatRooms()) {
|
||||
for (Participant pa : cr.getParticipants()) {
|
||||
if (pa.getAddress().asStringUriOnly().compareTo(sipUri.asStringUriOnly()) == 0) {
|
||||
return pa.getSecurityLevel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cr != null) return cr.getSecurityLevel();
|
||||
|
||||
return ChatRoomSecurityLevel.ClearText;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,12 +256,12 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
|
||||
refreshAccounts();
|
||||
|
||||
if(getResources().getBoolean(R.bool.use_phone_number_validation)
|
||||
/*if(getResources().getBoolean(R.bool.use_phone_number_validation)
|
||||
&& authInfo != null && authInfo.getDomain().equals(getString(R.string.default_domain))) {
|
||||
if (state.equals(RegistrationState.Ok)) {
|
||||
LinphoneManager.getInstance().isAccountWithAlias();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if(state.equals(RegistrationState.Failed) && newProxyConfig) {
|
||||
newProxyConfig = false;
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
mBackToCallButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBackToCallButton.setVisibility(View.GONE);
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt()) || mChatRoom.getNbParticipants() <= 1) {
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) {
|
||||
mCallButton.setVisibility(View.VISIBLE);
|
||||
mGroupInfosButton.setVisibility(View.GONE);
|
||||
mParticipantsLabel.setVisibility(View.GONE);
|
||||
|
|
|
|||
|
|
@ -33,9 +33,11 @@ import org.linphone.R;
|
|||
import org.linphone.activities.LinphoneActivity;
|
||||
import org.linphone.contacts.ContactAddress;
|
||||
import org.linphone.contacts.LinphoneContact;
|
||||
import org.linphone.core.Address;
|
||||
import org.linphone.core.ChatRoom;
|
||||
import org.linphone.core.ChatRoomSecurityLevel;
|
||||
import org.linphone.core.Participant;
|
||||
import org.linphone.core.ProxyConfig;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -96,7 +98,10 @@ public class GroupInfoAdapter extends BaseAdapter {
|
|||
LinphoneUtils.setThumbnailPictureFromUri(LinphoneActivity.instance(), avatar, c.getThumbnailUri());
|
||||
}*/
|
||||
//Spec Obiane
|
||||
ChatRoomSecurityLevel securityLevel = getSecurityLevelForSipUri(LinphoneManager.getLc(), ca.getAddress().asStringUriOnly());
|
||||
avatar.setVisibility(View.VISIBLE);
|
||||
ProxyConfig prx = LinphoneManager.getLc().getDefaultProxyConfig();
|
||||
Address ourUri = (prx != null) ? prx.getIdentityAddress() : null;
|
||||
ChatRoomSecurityLevel securityLevel = getSecurityLevelForSipUri(LinphoneManager.getLc(), ourUri, ca.getAddress());
|
||||
if (securityLevel == ChatRoomSecurityLevel.Safe) {
|
||||
avatar.setImageResource(R.drawable.avatar_big_secure2);
|
||||
} else if (securityLevel == ChatRoomSecurityLevel.Unsafe) {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ import org.linphone.core.ChatRoom;
|
|||
import org.linphone.core.ChatRoomSecurityLevel;
|
||||
import org.linphone.core.Core;
|
||||
import org.linphone.core.ParticipantImdnState;
|
||||
import org.linphone.core.ProxyConfig;
|
||||
import org.linphone.fragments.FragmentsAvailable;
|
||||
|
||||
import static org.linphone.LinphoneUtils.getSecurityLevelForSipUri;
|
||||
|
|
@ -160,8 +161,10 @@ public class ImdnFragment extends Fragment {
|
|||
refreshInfo();
|
||||
}
|
||||
|
||||
private void setPictureForContact(ImageView img, String sipUri) {
|
||||
ChatRoomSecurityLevel securityLevel = getSecurityLevelForSipUri(LinphoneManager.getLc(), sipUri);
|
||||
private void setPictureForContact(ImageView img, Address sipUri) {
|
||||
ProxyConfig prx = LinphoneManager.getLc().getDefaultProxyConfig();
|
||||
Address ourUri = (prx != null) ? prx.getIdentityAddress() : null;
|
||||
ChatRoomSecurityLevel securityLevel = getSecurityLevelForSipUri(LinphoneManager.getLc(), ourUri, sipUri);
|
||||
if (securityLevel == ChatRoomSecurityLevel.Safe) {
|
||||
img.setImageResource(R.drawable.avatar_big_secure2);
|
||||
} else if (securityLevel == ChatRoomSecurityLevel.Unsafe) {
|
||||
|
|
@ -233,7 +236,7 @@ public class ImdnFragment extends Fragment {
|
|||
} else {
|
||||
((ImageView)v.findViewById(R.id.contact_picture)).setImageBitmap(ContactsManager.getInstance().getDefaultAvatarBitmap());
|
||||
}*/
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address.asStringUriOnly());
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address);
|
||||
|
||||
mRead.addView(v);
|
||||
first = false;
|
||||
|
|
@ -257,7 +260,7 @@ public class ImdnFragment extends Fragment {
|
|||
} else {
|
||||
((ImageView)v.findViewById(R.id.contact_picture)).setImageBitmap(ContactsManager.getInstance().getDefaultAvatarBitmap());
|
||||
}*/
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address.asStringUriOnly());
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address);
|
||||
|
||||
mDelivered.addView(v);
|
||||
first = false;
|
||||
|
|
@ -281,7 +284,7 @@ public class ImdnFragment extends Fragment {
|
|||
} else {
|
||||
((ImageView)v.findViewById(R.id.contact_picture)).setImageBitmap(ContactsManager.getInstance().getDefaultAvatarBitmap());
|
||||
}*/
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address.asStringUriOnly());
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address);
|
||||
|
||||
mSent.addView(v);
|
||||
first = false;
|
||||
|
|
@ -304,7 +307,7 @@ public class ImdnFragment extends Fragment {
|
|||
} else {
|
||||
((ImageView)v.findViewById(R.id.contact_picture)).setImageBitmap(ContactsManager.getInstance().getDefaultAvatarBitmap());
|
||||
}*/
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address.asStringUriOnly());
|
||||
setPictureForContact(((ImageView)v.findViewById(R.id.contact_picture)), address);
|
||||
|
||||
mUndelivered.addView(v);
|
||||
first = false;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@ public class ContactDetailsFragment extends Fragment implements OnClickListener
|
|||
mWaitLayout.setVisibility(View.VISIBLE);
|
||||
mChatRoom = lc.createClientGroupChatRoom(getString(R.string.dummy_group_chat_subject), true);
|
||||
mChatRoom.addListener(mChatRoomCreationListener);
|
||||
mChatRoom.addParticipant(participant);
|
||||
Address participants[] = new Address[1];
|
||||
participants[0] = participant;
|
||||
mChatRoom.addParticipants(participants);
|
||||
} else {
|
||||
room = lc.getChatRoom(participant);
|
||||
LinphoneActivity.instance().goToChat(room.getPeerAddress().asStringUriOnly(), null);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import org.linphone.core.Address;
|
|||
import org.linphone.core.CallLog;
|
||||
import org.linphone.core.Call.Status;
|
||||
import org.linphone.core.ChatRoomSecurityLevel;
|
||||
import org.linphone.core.ProxyConfig;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
|
|
@ -490,7 +491,10 @@ public class HistoryListFragment extends Fragment implements OnClickListener, On
|
|||
holder.contactPicture.setImageBitmap(ContactsManager.getInstance().getDefaultAvatarBitmap());
|
||||
}*/
|
||||
//Spec Obiane
|
||||
ChatRoomSecurityLevel securityLevel = getSecurityLevelForSipUri(LinphoneManager.getLc(), sipUri);
|
||||
holder.contactPicture.setVisibility(View.VISIBLE);
|
||||
ProxyConfig prx = LinphoneManager.getLc().getDefaultProxyConfig();
|
||||
Address ourUri = (prx != null) ? prx.getIdentityAddress() : null;
|
||||
ChatRoomSecurityLevel securityLevel = getSecurityLevelForSipUri(LinphoneManager.getLc(), ourUri, address);
|
||||
if (securityLevel == ChatRoomSecurityLevel.Safe) {
|
||||
holder.contactPicture.setImageResource(R.drawable.avatar_big_secure2);
|
||||
} else if (securityLevel == ChatRoomSecurityLevel.Unsafe) {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 547a58b195ed92def2cc5be327529128fc6e537d
|
||||
Subproject commit 47a4f5d0c6ab73616c4ba43a02e1dc0bdd2a9e66
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 5eb2cbfab2f87b6d58cda339d6a726166881e87a
|
||||
Subproject commit 1ec7aa506501f5f7605939e361a0f066bde3e1e9
|
||||
Loading…
Add table
Reference in a new issue