diff --git a/res/layout/contact_cell.xml b/res/layout/contact_cell.xml
index 407c139ae..58d792346 100644
--- a/res/layout/contact_cell.xml
+++ b/res/layout/contact_cell.xml
@@ -23,15 +23,38 @@
android:layout_margin="5dp"
android:gravity="center_vertical">
-
+
+
+
+
+
+
+
-
-
>> updateAvatarPresence status = " + presenceStatus + " - vs basicStatus = " + basicStatus);
+
+ if (basicStatus == PresenceBasicStatus.Closed) {
+ friendStatus.setImageResource(R.drawable.presence_unregistered);
+ } else if (presenceStatus == OnlineStatus.Online.toString()) {
+ friendStatus.setImageResource(R.drawable.presence_online);
+ } else {
+ friendStatus.setImageResource(R.drawable.presence_offline);
+ }
+ } else{
+ Log.e("===>>> updateAvatarPresence friend is null ");
+ friendStatus.setImageResource(R.drawable.presence_unregistered);
+ }
+ }
- if (isEditMode) {
- delete.setVisibility(View.VISIBLE);
- delete.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
- contactsList.setItemChecked(position, b);
- if(getNbItemsChecked() == getCount()){
- deselectAll.setVisibility(View.VISIBLE);
- selectAll.setVisibility(View.GONE);
- enabledDeleteButton(true);
- } else {
- if(getNbItemsChecked() == 0){
- deselectAll.setVisibility(View.GONE);
- selectAll.setVisibility(View.VISIBLE);
- enabledDeleteButton(false);
- } else {
- deselectAll.setVisibility(View.GONE);
- selectAll.setVisibility(View.VISIBLE);
- enabledDeleteButton(true);
- }
- }
- }
- });
- if (contactsList.isItemChecked(position)) {
- delete.setChecked(true);
- } else {
- delete.setChecked(false);
- }
- } else {
- delete.setVisibility(View.GONE);
- }
-
- ImageView friendStatus = (ImageView) view.findViewById(R.id.friendStatus);
- LinphoneFriend[] friends = LinphoneManager.getLc().getFriendList();
- if (!ContactsManager.getInstance().isContactPresenceDisabled() && friends != null) {
- friendStatus.setVisibility(View.VISIBLE);
- PresenceActivityType presenceActivity = friends[0].getPresenceModel().getActivity().getType();
- if (presenceActivity == PresenceActivityType.Online) {
- friendStatus.setImageResource(R.drawable.led_connected);
- } else if (presenceActivity == PresenceActivityType.Busy) {
- friendStatus.setImageResource(R.drawable.led_error);
- } else if (presenceActivity == PresenceActivityType.Away) {
- friendStatus.setImageResource(R.drawable.led_inprogress);
- } else if (presenceActivity == PresenceActivityType.Offline) {
- friendStatus.setImageResource(R.drawable.led_disconnected);
- } else {
- friendStatus.setImageResource(R.drawable.call_quality_indicator_0);
- }
- }
-
return view;
}
- @Override
+ @Override
public Object[] getSections() {
return sections;
}
diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java
index 3a0fdca25..a3af5d695 100644
--- a/src/org/linphone/LinphoneActivity.java
+++ b/src/org/linphone/LinphoneActivity.java
@@ -42,6 +42,7 @@ import org.linphone.core.LinphoneCore.RegistrationState;
import org.linphone.core.LinphoneCoreException;
import org.linphone.core.LinphoneCoreFactory;
import org.linphone.core.LinphoneCoreListenerBase;
+import org.linphone.core.LinphoneFriend;
import org.linphone.core.LinphoneProxyConfig;
import org.linphone.core.Reason;
import org.linphone.mediastream.Log;
@@ -65,6 +66,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.widget.DrawerLayout;
+import android.transition.ChangeTransform;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -274,6 +276,19 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
int missedCalls = LinphoneManager.getLc().getMissedCallsCount();
displayMissedCalls(missedCalls);
}
+
+ @Override
+ public void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) {
+ // if(currentFragment == FragmentsAvailable.HISTORY_DETAIL || currentFragment == FragmentsAvailable.HISTORY_LIST || currentFragment == FragmentsAvailable.CONTACTS_LIST
+ // || currentFragment == FragmentsAvailable.CONTACT_DETAIL || currentFragment == FragmentsAvailable.CONTACT_EDITOR || currentFragment == FragmentsAvailable.CHAT_LIST
+ // || currentFragment == FragmentsAvailable.CHAT){
+
+ if(currentFragment == FragmentsAvailable.CONTACTS_LIST){
+ if (contactListFragment != null && contactListFragment.isVisible()) {
+ ((ContactsListFragment) contactListFragment).invalidate();
+ }
+ }
+ }
};
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
diff --git a/src/org/linphone/LinphoneContact.java b/src/org/linphone/LinphoneContact.java
index 2a77c1660..bc86aa52e 100644
--- a/src/org/linphone/LinphoneContact.java
+++ b/src/org/linphone/LinphoneContact.java
@@ -29,6 +29,7 @@ import org.linphone.core.LinphoneCoreException;
import org.linphone.core.LinphoneCoreFactory;
import org.linphone.core.LinphoneFriend;
import org.linphone.core.LinphoneFriend.SubscribePolicy;
+import org.linphone.core.PresenceModel;
import org.linphone.mediastream.Log;
import android.content.ContentProviderOperation;
@@ -431,6 +432,11 @@ public class LinphoneContact implements Serializable, Comparable> notifyPresenceReceived : "+lf.getName());
}
@Override
diff --git a/submodules/bcg729 b/submodules/bcg729
index 78aedfdf5..4edc094bc 160000
--- a/submodules/bcg729
+++ b/submodules/bcg729
@@ -1 +1 @@
-Subproject commit 78aedfdf5cb02565ceb48e4acef202462c2f0dbf
+Subproject commit 4edc094bcfee08032b6d6fb38cfb00ecf66a9f49
diff --git a/submodules/bctoolbox b/submodules/bctoolbox
index b3a628c7d..29e865b55 160000
--- a/submodules/bctoolbox
+++ b/submodules/bctoolbox
@@ -1 +1 @@
-Subproject commit b3a628c7de0f6f74e09e60b134de6e3ebfbd3a54
+Subproject commit 29e865b5566890ae1ba3a50b0699337ef926d6b5
diff --git a/submodules/belcard b/submodules/belcard
index da7030bb3..129a9f0cb 160000
--- a/submodules/belcard
+++ b/submodules/belcard
@@ -1 +1 @@
-Subproject commit da7030bb322f4cd74638e6710007b1470c1b602e
+Subproject commit 129a9f0cbb880361d1f10c08fd4c2bd188ec0565
diff --git a/submodules/cmake-builder b/submodules/cmake-builder
index 1bff470db..4c486cf29 160000
--- a/submodules/cmake-builder
+++ b/submodules/cmake-builder
@@ -1 +1 @@
-Subproject commit 1bff470db4829ed6c83712ee4a4b8cf973c6188a
+Subproject commit 4c486cf295bc4e8187c8315e95a687a030456ac3
diff --git a/submodules/linphone b/submodules/linphone
index 6f48b4151..f0cd38ef2 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit 6f48b4151cce800cb300a2c4c8dd8b32e7275c1b
+Subproject commit f0cd38ef228cf26bfdd0fd8bd037fd74fb1e1c5a