long providerId = cursor.getLong(BlockedContactsActivity.PROVIDER_COLUMN);
String username = cursor.getString(BlockedContactsActivity.USERNAME_COLUMN);
String nickname = cursor.getString(BlockedContactsActivity.NICKNAME_COLUMN);
Drawable avatar = DatabaseUtils.getAvatarFromCursor(cursor,
BlockedContactsActivity.AVATAR_COLUMN);
if (avatar != null) {
mAvatar.setImageDrawable(avatar);
} else {
mAvatar.setImageResource(R.drawable.avatar_unknown);
}
ImApp app = ImApp.getApplication((Activity)mContext);
BrandingResources brandingRes = app.getBrandingResource(providerId);
mBlockedIcon.setImageDrawable(brandingRes.getDrawable(BrandingResourceIDs.DRAWABLE_BLOCK));
mLine1.setText(nickname);
mLine2.setText(ImpsAddressUtils.getDisplayableAddress(username));