# HG changeset patch # User darisk@kaaliyah # Date 1250107210 -7200 # Node ID 718557c6c30968a2fde10bfce82e90e7e14db531 # Parent 5bb849b490994c4cde703b266a320fedac77ae28 Checkstyle rules diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/BeemService.java --- a/src/com/beem/project/beem/BeemService.java Mon Aug 10 07:42:50 2009 +0200 +++ b/src/com/beem/project/beem/BeemService.java Wed Aug 12 22:00:10 2009 +0200 @@ -105,6 +105,9 @@ mConnectionConfiguration.setSendPresence(true); } + /** + * Initialize the listener for Roster request. + */ private void initRosterRequestListener() { Roster.setDefaultSubscriptionMode(SubscriptionMode.manual); final XMPPConnection con = mConnection.getAdaptee(); diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/beem/project/beem/package-info.java Wed Aug 12 22:00:10 2009 +0200 @@ -0,0 +1,4 @@ +/** + * This package contains the main class for the Beem application. + */ +package com.beem.project.beem; diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/service/BeemChatManager.java --- a/src/com/beem/project/beem/service/BeemChatManager.java Mon Aug 10 07:42:50 2009 +0200 +++ b/src/com/beem/project/beem/service/BeemChatManager.java Wed Aug 12 22:00:10 2009 +0200 @@ -154,8 +154,10 @@ private final ChatManager mAdaptee; private final Map mChats = new HashMap(); private final ChatListener mChatListener = new ChatListener(); - private final RemoteCallbackList mRemoteChatCreationListeners = new RemoteCallbackList(); - private final RemoteCallbackList mRemoteMessageListeners = new RemoteCallbackList(); + private final RemoteCallbackList mRemoteChatCreationListeners + = new RemoteCallbackList(); + private final RemoteCallbackList mRemoteMessageListeners + = new RemoteCallbackList(); private final BeemService mService; diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/service/Contact.java --- a/src/com/beem/project/beem/service/Contact.java Mon Aug 10 07:42:50 2009 +0200 +++ b/src/com/beem/project/beem/service/Contact.java Wed Aug 12 22:00:10 2009 +0200 @@ -23,14 +23,6 @@ */ public class Contact implements Parcelable { - private int mID; - private int mStatus; - private String mJID; - private String mMsgState; - private List mRes; - private List mGroups; - private String mName; - /** * Parcelable.Creator needs by Android. */ @@ -47,6 +39,14 @@ } }; + private int mID; + private int mStatus; + private String mJID; + private String mMsgState; + private List mRes; + private List mGroups; + private String mName; + /** * Constructor. */ diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/service/RosterAdapter.java --- a/src/com/beem/project/beem/service/RosterAdapter.java Mon Aug 10 07:42:50 2009 +0200 +++ b/src/com/beem/project/beem/service/RosterAdapter.java Wed Aug 12 22:00:10 2009 +0200 @@ -109,7 +109,7 @@ mAdaptee.createGroup(groupname); } catch (IllegalArgumentException e) { //pas grave, plus simple a gerer comme ca. - ; + Log.e(TAG, "Error while creating group", e); } } @@ -172,6 +172,8 @@ /** * Get a contact from a RosterEntry. + * @param entry a roster entry containing information for the contact. + * @return a contact for this entry. */ private Contact getContactFromRosterEntry(RosterEntry entry) { String user = StringUtils.parseBareAddress(entry.getUser()); @@ -194,6 +196,11 @@ public RosterListenerAdapter() { } + /** + * Event which is fired when an entry is deleted for a group. + * @param group the group the entry was. + * @param jid the jid of the entry which is deleted. + */ public void onEntryDeleteFromGroup(String group, String jid) { //Log.i(TAG, "entry delete listener"); final int n = mRemoteRosListeners.beginBroadcast(); diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/service/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/beem/project/beem/service/package-info.java Wed Aug 12 22:00:10 2009 +0200 @@ -0,0 +1,5 @@ +/** + * This package contains the class used by the Beem service + * process. + */ +package com.beem.project.beem.service; diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/ui/AddContact.java --- a/src/com/beem/project/beem/ui/AddContact.java Mon Aug 10 07:42:50 2009 +0200 +++ b/src/com/beem/project/beem/ui/AddContact.java Wed Aug 12 22:00:10 2009 +0200 @@ -1,12 +1,8 @@ -/** - * - */ package com.beem.project.beem.ui; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; - import android.app.Activity; import android.content.ComponentName; import android.content.Intent; @@ -20,12 +16,12 @@ import android.widget.Button; import android.widget.EditText; import android.widget.Toast; - import com.beem.project.beem.BeemService; import com.beem.project.beem.R; import com.beem.project.beem.service.aidl.IXmppFacade; /** + * This activity is used to add a contact. * @author nikita */ public class AddContact extends Activity { @@ -40,6 +36,9 @@ */ public AddContact() { } + /** + * @{InheritDoc} + */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -49,6 +48,9 @@ bindService(new Intent(this, BeemService.class), mServConn, BIND_AUTO_CREATE); } + /** + * @{InheritDoc} + */ @Override protected void onStop() { super.onStop(); @@ -79,6 +81,7 @@ /** * Get the text of a widget. * @param id the id of the widget. + * @return the text of the widget. */ private String getWidgetText(int id) { EditText widget = (EditText) this.findViewById(id); diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/ui/CreateAccount.java --- a/src/com/beem/project/beem/ui/CreateAccount.java Mon Aug 10 07:42:50 2009 +0200 +++ b/src/com/beem/project/beem/ui/CreateAccount.java Wed Aug 12 22:00:10 2009 +0200 @@ -58,6 +58,7 @@ * Create an account on the XMPP server specified in settings. * @param username the username of the account. * @param password the password of the account. + * @return true if the account was created successfully. */ private boolean createAccount(String username, String password) { XMPPConnection xmppConnection = null; @@ -210,6 +211,7 @@ /** * Check the format of the email. + * @return true if the email is valid. */ private boolean checkEmail() { String email = ((TextView) findViewById(R.id.create_account_username)).getText().toString(); diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/ui/Login.java --- a/src/com/beem/project/beem/ui/Login.java Mon Aug 10 07:42:50 2009 +0200 +++ b/src/com/beem/project/beem/ui/Login.java Wed Aug 12 22:00:10 2009 +0200 @@ -31,7 +31,7 @@ */ public class Login extends Activity { - protected static final String TAG = "LOG_AS"; + private static final String TAG = "LOG_AS"; private static final Intent SERVICE_INTENT = new Intent(); static { SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService")); diff -r 5bb849b49099 -r 718557c6c309 src/com/beem/project/beem/ui/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/com/beem/project/beem/ui/package-info.java Wed Aug 12 22:00:10 2009 +0200 @@ -0,0 +1,5 @@ +/** + * This package contains the class concerning the user interface + * (activities) of Beem. + */ +package com.beem.project.beem.ui;