chekstyle
authorDa Risk <darisk972@gmail.com>
Tue, 21 Dec 2010 23:45:46 +0100
changeset 831 7b8af7616ba9
parent 830 e6f793612724
child 832 696b2880c994
chekstyle
src/com/beem/project/beem/ui/Chat.java
src/com/beem/project/beem/ui/ContactList.java
--- a/src/com/beem/project/beem/ui/Chat.java	Tue Dec 21 23:27:33 2010 +0100
+++ b/src/com/beem/project/beem/ui/Chat.java	Tue Dec 21 23:45:46 2010 +0100
@@ -574,6 +574,12 @@
 	mContactStatusIcon.setImageLevel(mContact.getStatus());
     }
 
+    /**
+     * Get a Drawable containing the avatar icon.
+     *
+     * @param avatarId the avatar id to retrieve or null to get default
+     * @return a Drawable
+     */
     private Drawable getAvatarDrawable(String avatarId) {
 	Drawable avatarDrawable = null;
 	try {
--- a/src/com/beem/project/beem/ui/ContactList.java	Tue Dec 21 23:27:33 2010 +0100
+++ b/src/com/beem/project/beem/ui/ContactList.java	Tue Dec 21 23:45:46 2010 +0100
@@ -662,14 +662,19 @@
 		ImageView img = (ImageView) view.findViewById(R.id.avatar);
 		String avatarId = curContact.getAvatarId();
 		int contactStatus = curContact.getStatus();
-		Drawable avatar = getAvatarStatusDrawable(curContact.getAvatarId(),
-			curContact.getStatus());
+		Drawable avatar = getAvatarStatusDrawable(curContact.getAvatarId());
 		img.setImageDrawable(avatar);
 		img.setImageLevel(contactStatus);
 	    }
 	}
 
-	private Drawable getAvatarStatusDrawable(String avatarId, int contactStatus) {
+	/**
+	 * Get a LayerDrawable containing the avatar and the status icon.
+	 * The status icon will change with the level of the drawable.
+	 * @param avatarId the avatar id to retrieve or null to get default
+	 * @return a LayerDrawable
+	 */
+	private Drawable getAvatarStatusDrawable(String avatarId) {
 	    Drawable avatarDrawable = null;
 	    try {
 		byte[] avatar = mXmppFacade.getAvatar(avatarId);