static String getSenderAddressFromCursor(Cursor cursor) { String fromList = cursor.getString(SENDER_LIST_COLUMN); Address[] fromAddrs = Address.unpack(fromList); return (fromAddrs.length > 0) ? fromAddrs[0].getAddress() : null; }
this.setSubject(subject == null ? "" : subject); Address[] from = Address.unpack(cursor.getString(LocalStore.MSG_INDEX_SENDER_LIST)); if (from.length > 0) { this.setFrom(from[0]); this.setRecipients(RecipientType.TO, Address.unpack(cursor.getString(LocalStore.MSG_INDEX_TO))); this.setRecipients(RecipientType.CC, Address.unpack(cursor.getString(LocalStore.MSG_INDEX_CC))); this.setRecipients(RecipientType.BCC, Address.unpack(cursor.getString(LocalStore.MSG_INDEX_BCC))); this.setReplyTo(Address.unpack(cursor.getString(LocalStore.MSG_INDEX_REPLY_TO)));