mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-24 07:08:09 +00:00
[Presence] isPresenceReceived updated
This commit is contained in:
parent
614c6022cf
commit
e8895acd68
3 changed files with 8 additions and 2 deletions
|
|
@ -457,6 +457,10 @@ public class LinphoneContact implements Serializable, Comparable<LinphoneContact
|
|||
return this.friend.equals(mFriend);
|
||||
}
|
||||
|
||||
public boolean isPresenceReceived(){
|
||||
return this.friend.isPresenceReceived();
|
||||
}
|
||||
|
||||
public static LinphoneContact createContact() {
|
||||
if (ContactsManager.getInstance().hasContactsAccess()) {
|
||||
return createAndroidContact();
|
||||
|
|
|
|||
|
|
@ -655,7 +655,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
PreferencesMigrator prefMigrator = new PreferencesMigrator(mServiceContext);
|
||||
prefMigrator.migrateRemoteProvisioningUriIfNeeded();
|
||||
prefMigrator.migrateSharingServerUrlIfNeeded();
|
||||
|
||||
|
||||
if (prefMigrator.isMigrationNeeded()) {
|
||||
prefMigrator.doMigration();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,8 @@ public class AvatarWithPresenceImage extends RelativeLayout implements onPresenc
|
|||
PresenceModel presenceModel = contact.getFriendPresenceModel();
|
||||
PresenceBasicStatus basicStatus = presenceModel.getBasicStatus();
|
||||
if (basicStatus == PresenceBasicStatus.Closed) {
|
||||
if(friend.getPresenceModel() != null){
|
||||
if(presenceModel.getActivity() != null && contact.isPresenceReceived() ){
|
||||
Log.e("===>>> updatePresenceIcon 1");
|
||||
friendStatusSmall.setImageResource(R.drawable.presence_away);
|
||||
friendStatusBig.setImageResource(R.drawable.presence_away);
|
||||
}else {
|
||||
|
|
@ -118,6 +119,7 @@ public class AvatarWithPresenceImage extends RelativeLayout implements onPresenc
|
|||
friendStatusSmall.setImageResource(R.drawable.presence_online);
|
||||
friendStatusBig.setImageResource(R.drawable.presence_online);
|
||||
} else {
|
||||
Log.e("===>>> updatePresenceIcon 2");
|
||||
friendStatusSmall.setImageResource(R.drawable.presence_away);
|
||||
friendStatusBig.setImageResource(R.drawable.presence_away);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue