mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 20:08:08 +00:00
Fix avatar in notification and fix remove chatroom
This commit is contained in:
parent
6dfd89c759
commit
2e0985d740
3 changed files with 6 additions and 6 deletions
BIN
res/drawable-xhdpi/topbar_avatar.png
Normal file
BIN
res/drawable-xhdpi/topbar_avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -533,7 +533,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
}
|
||||
});
|
||||
if(chatList.isItemChecked(position)) {
|
||||
enabledDeleteButton(true);
|
||||
select.setChecked(true);
|
||||
} else {
|
||||
select.setChecked(false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,12 +320,12 @@ public final class LinphoneService extends Service {
|
|||
address.setDisplayName(displayName);
|
||||
|
||||
Contact contact = ContactsManager.getInstance().findContactWithAddress(getContentResolver(), address);
|
||||
Uri pictureUri = contact != null ? contact.getPhotoUri() : null;
|
||||
Uri pictureUri = contact != null ? contact.getThumbnailUri() : null;
|
||||
Bitmap bm = null;
|
||||
try {
|
||||
bm = MediaStore.Images.Media.getBitmap(getContentResolver(), pictureUri);
|
||||
} catch (Exception e) {
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.avatar);
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.topbar_avatar);
|
||||
}
|
||||
String name = address.getDisplayName() == null ? address.getUserName() : address.getDisplayName();
|
||||
mIncallNotif = Compatibility.createInCallNotification(getApplicationContext(), mNotificationTitle, getString(notificationTextId), inconId, bm, name, mNotifContentIntent);
|
||||
|
|
@ -399,7 +399,7 @@ public final class LinphoneService extends Service {
|
|||
try {
|
||||
Contact contact = ContactsManager.getInstance().findContactWithAddress(getContentResolver(), LinphoneCoreFactory.instance().createLinphoneAddress(fromSipUri));
|
||||
if (contact != null)
|
||||
pictureUri = contact.getPhotoUri();
|
||||
pictureUri = contact.getThumbnailUri();
|
||||
} catch (LinphoneCoreException e1) {
|
||||
Log.e("Cannot parse from address ", e1);
|
||||
}
|
||||
|
|
@ -409,10 +409,10 @@ public final class LinphoneService extends Service {
|
|||
try {
|
||||
bm = MediaStore.Images.Media.getBitmap(getContentResolver(), pictureUri);
|
||||
} catch (Exception e) {
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.avatar);
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.topbar_avatar);
|
||||
}
|
||||
} else {
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.avatar);
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.topbar_avatar);
|
||||
}
|
||||
mMsgNotif = Compatibility.createMessageNotification(getApplicationContext(), mMsgNotifCount, fromName, message, bm, notifContentIntent);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue