--- a/src/com/beem/project/beem/service/LoginAsyncTask.java Fri Jan 08 17:16:17 2010 +0100
+++ b/src/com/beem/project/beem/service/LoginAsyncTask.java Fri Jan 08 17:26:22 2010 +0100
@@ -56,13 +56,25 @@
*/
public class LoginAsyncTask extends AsyncTask<IXmppFacade, Integer, Boolean> {
- public static final String TAG = "BeemLoginTask";
-
+ /**
+ * State of a running connection.
+ */
public static final int STATE_CONNECTION_RUNNING = 1;
+ /**
+ * State of an already connected connection but authentication is running.
+ */
public static final int STATE_LOGIN_RUNNING = 2;
+ /**
+ * State of a connected and authenticated succesfully.
+ */
public static final int STATE_LOGIN_SUCCESS = 3;
+ /**
+ * State of a connected but failed authentication.
+ */
public static final int STATE_LOGIN_FAILED = 4;
+ private static final String TAG = "BeemLoginTask";
+
private IXmppConnection mConnection;
private String mErrorMessage;
@@ -92,7 +104,7 @@
}
publishProgress(STATE_LOGIN_SUCCESS);
} catch (RemoteException e) {
- mErrorMessage= "Exception during connection :" + e;
+ mErrorMessage = "Exception during connection :" + e;
result = false;
}
return result;
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Fri Jan 08 17:16:17 2010 +0100
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Fri Jan 08 17:26:22 2010 +0100
@@ -171,7 +171,7 @@
return true;
} catch (XMPPException e) {
Log.e(TAG, "Error while connecting", e);
- if (!"".equals(e.getMessage()))
+ if (!"".equals(e.getMessage()))
mErrorMsg = e.getMessage();
else
mErrorMsg = e.toString();
@@ -216,7 +216,7 @@
return true;
} catch (XMPPException e) {
Log.e(TAG, "Error while connecting", e);
- if (!"".equals(e.getMessage()))
+ if (!"".equals(e.getMessage()))
mErrorMsg = e.getMessage();
else
mErrorMsg = e.toString();
@@ -646,9 +646,16 @@
* @author Da Risk <da_risk@elyzion.net>
*/
private class SubscribePacketListener implements PacketListener {
+
+ /**
+ * Constructor.
+ */
+ public SubscribePacketListener() {
+ }
+
@Override
public void processPacket(Packet packet) {
- if ( ! (packet instanceof Presence))
+ if (!(packet instanceof Presence))
return;
Presence p = (Presence) packet;
if (p.getType() != Presence.Type.subscribe)
--- a/src/com/beem/project/beem/ui/LoginAnim.java Fri Jan 08 17:16:17 2010 +0100
+++ b/src/com/beem/project/beem/ui/LoginAnim.java Fri Jan 08 17:26:22 2010 +0100
@@ -50,7 +50,6 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.IBinder;
-import android.os.RemoteException;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
@@ -61,7 +60,6 @@
import android.widget.ImageView;
import com.beem.project.beem.R;
-import com.beem.project.beem.service.aidl.IXmppConnection;
import com.beem.project.beem.service.aidl.IXmppFacade;
import com.beem.project.beem.service.LoginAsyncTask;