Checkstyle.
authorDa Risk <darisk972@gmail.com>
Sat, 13 Feb 2010 16:22:48 +0100
changeset 654 6f4814eb7951
parent 653 e94abef6120c
child 656 b78913fc1a08
child 659 234e13ea0826
Checkstyle.
src/com/beem/project/beem/service/Message.java
src/com/beem/project/beem/ui/Chat.java
--- a/src/com/beem/project/beem/service/Message.java	Thu Feb 11 17:52:41 2010 +0100
+++ b/src/com/beem/project/beem/service/Message.java	Sat Feb 13 16:22:48 2010 +0100
@@ -47,7 +47,6 @@
 
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.util.Log;
 
 /**
  * This class represents a instant message.
--- a/src/com/beem/project/beem/ui/Chat.java	Thu Feb 11 17:52:41 2010 +0100
+++ b/src/com/beem/project/beem/ui/Chat.java	Sat Feb 13 16:22:48 2010 +0100
@@ -53,7 +53,6 @@
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.ComponentName;
-import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
@@ -61,7 +60,6 @@
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Color;
-import android.graphics.Typeface;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
@@ -81,7 +79,6 @@
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
 
@@ -351,6 +348,11 @@
 	mMessagesListAdapter.notifyDataSetChanged();
     }
 
+    /**
+     * Convert a list of Mesage coming from the service to a list of MessageText that can be displayed in UI.
+     * @param chatMessages the list of Message
+     * @return a list of message that can be displayed.
+     */
     private List<MessageText> convertMessagesList(List<Message> chatMessages) {
 	List<MessageText> result = new ArrayList<MessageText>(chatMessages.size());
 	String remoteName = mContact.getName();
@@ -398,7 +400,7 @@
 	public void onServiceConnected(ComponentName name, IBinder service) {
 	    mXmppFacade = IXmppFacade.Stub.asInterface(service);
 	    try {
-		if ((mRoster = mXmppFacade.getRoster()) != null )
+		if ((mRoster = mXmppFacade.getRoster()) != null)
 		    mRoster.addRosterListener(mBeemRosterListener);
 		mContact = new Contact(getIntent().getData());
 		if ((mChatManager = mXmppFacade.getChatManager()) != null)
@@ -667,7 +669,7 @@
 	 * @param message A String containing the message.
 	 * @param isError if the message is an error message.
 	 */
-	public MessageText(final String bareJid, final String name, final String message, boolean isError) {
+	public MessageText(final String bareJid, final String name, final String message, final boolean isError) {
 	    mBareJid = bareJid;
 	    mName = name;
 	    mMessage = message;
@@ -724,6 +726,10 @@
 	    mMessage = message;
 	}
 
+	/**
+	 * Get the message type.
+	 * @return true if the message is an error message.
+	 */
 	public boolean isError() {
 	    return mIsError;
 	}
@@ -773,9 +779,4 @@
 	    mInputField.setText(null);
 	}
     }
-
-    @Override
-    protected void finalize() {
-	Log.e("CHATFIN", "FINALIZE");
-    }
 }