# HG changeset patch # User Nikita Kozlov # Date 1320540951 -3600 # Node ID f78522cede879d01ada0d78bb24870bb54edb8e5 # Parent 55e6f340914604171f10937b94454758527df4fb checkstyle diff -r 55e6f3409146 -r f78522cede87 build.xml --- a/build.xml Sun Nov 06 00:35:02 2011 +0100 +++ b/build.xml Sun Nov 06 01:55:51 2011 +0100 @@ -1,102 +1,85 @@ - + - + It contains the path to the SDK. It should *NOT* be checked into + Version Control Systems. --> + - - + - - + - - - - - - - + This contains project specific properties such as project target, and library + dependencies. Lower level build properties are stored in ant.properties + (or in .classpath for Eclipse projects). - + This file is an integral part of the build system for your + application and should be checked into Version Control Systems. --> + - + - The rules file is imported from - /platforms//templates/android_rules.xml - - To customize some build steps for your project: - - copy the content of the main node from android_rules.xml - - paste it in this build.xml below the task. - - disable the import by changing the setup task below to - This will ensure that the properties are setup correctly but that your customized - build steps are used. - --> - - - - - - - - + + + + + + diff -r 55e6f3409146 -r f78522cede87 src/com/beem/project/beem/otr/BeemOtrManager.java --- a/src/com/beem/project/beem/otr/BeemOtrManager.java Sun Nov 06 00:35:02 2011 +0100 +++ b/src/com/beem/project/beem/otr/BeemOtrManager.java Sun Nov 06 01:55:51 2011 +0100 @@ -23,7 +23,7 @@ Please send bug reports with examples or suggestions to contact@beem-project.com or http://www.beem-project.com/ - */ +*/ package com.beem.project.beem.otr; import java.io.IOException; @@ -111,18 +111,36 @@ mChats.remove(sessionID); } + /** + * get the fingerprint of the remote part + * @param sessionID the otr session + * @return a string containing the fingerprint + */ public String getRemoteFingerprint(final SessionID sessionID) { return mOtrKeyManager.getRemoteFingerprint(sessionID); } + /** + * set the remote fingerprint as verified + * @param sessionId the current otr session + */ public void verifyRemoteFingerprint(final SessionID sessionId) { mOtrKeyManager.verify(sessionId); } + /** + * remove the remote fingerprint from verified fingerprints + * @param sessionId the current otr session + */ public void unverifyRemoteFingerprint(final SessionID sessionId) { mOtrKeyManager.unverify(sessionId); } + /** + * get the local fingerprint + * @param sessionID the otr session + * @return a string containing the fingerprint + */ public String getLocalFingerprint(final SessionID sessionID) { return mOtrKeyManager.getLocalFingerprint(sessionID); } diff -r 55e6f3409146 -r f78522cede87 src/com/beem/project/beem/service/BeemChatManager.java --- a/src/com/beem/project/beem/service/BeemChatManager.java Sun Nov 06 00:35:02 2011 +0100 +++ b/src/com/beem/project/beem/service/BeemChatManager.java Sun Nov 06 01:55:51 2011 +0100 @@ -98,7 +98,7 @@ * Constructor. * @param chatManager the smack ChatManager to adapt * @param service the service which runs the chat manager - * @param roster + * @param roster roster used to get presences changes */ public BeemChatManager(final ChatManager chatManager, final BeemService service, final Roster roster) { mService = service; @@ -337,6 +337,11 @@ } } + /** + * implement a roster listener, is used to detect and close otr chats + * @author nikita + * + */ private class ChatRosterListener implements RosterListener { @Override diff -r 55e6f3409146 -r f78522cede87 src/com/beem/project/beem/service/ChatAdapter.java --- a/src/com/beem/project/beem/service/ChatAdapter.java Sun Nov 06 00:35:02 2011 +0100 +++ b/src/com/beem/project/beem/service/ChatAdapter.java Sun Nov 06 01:55:51 2011 +0100 @@ -125,7 +125,6 @@ /** * private method for sending message. * @param message the message to send - * @param log do we want to log (in memory and history) the message? */ private void transferMessage(com.beem.project.beem.service.Message message) { org.jivesoftware.smack.packet.Message send = new org.jivesoftware.smack.packet.Message(); @@ -308,6 +307,10 @@ return mHistoryPath; } + /** + * log a message + * @param message message to log + */ private void logMessage(com.beem.project.beem.service.Message message) { String state = Environment.getExternalStorageState(); if (mIsHistory && Environment.MEDIA_MOUNTED.equals(state)) @@ -315,6 +318,11 @@ } + /** + * encrypt a message with an otr session + * @param unencrypted message with cleartext body + * @return message with encrypted body + */ private com.beem.project.beem.service.Message otrEncryptMessage(com.beem.project.beem.service.Message unencrypted) { if (mOtrSessionId != null && unencrypted != null && unencrypted.getBody() != null) { diff -r 55e6f3409146 -r f78522cede87 src/com/beem/project/beem/ui/Chat.java --- a/src/com/beem/project/beem/ui/Chat.java Sun Nov 06 00:35:02 2011 +0100 +++ b/src/com/beem/project/beem/ui/Chat.java Sun Nov 06 01:55:51 2011 +0100 @@ -651,6 +651,7 @@ /** * Update the OTR informations. + * @param otrState the otr state */ private void updateOtrInformations(final String otrState) { String text = null; diff -r 55e6f3409146 -r f78522cede87 src/com/beem/project/beem/ui/dialogs/builders/DisplayOtrFingerprint.java --- a/src/com/beem/project/beem/ui/dialogs/builders/DisplayOtrFingerprint.java Sun Nov 06 00:35:02 2011 +0100 +++ b/src/com/beem/project/beem/ui/dialogs/builders/DisplayOtrFingerprint.java Sun Nov 06 01:55:51 2011 +0100 @@ -40,7 +40,7 @@ Flavien Astraud, November 26, 2009 Head of the EIP Laboratory. - */ +*/ package com.beem.project.beem.ui.dialogs.builders; import android.app.AlertDialog; @@ -52,7 +52,9 @@ import com.beem.project.beem.service.aidl.IChat; /** - * + * + * Use this builder to build a dialog which allows you to display otr fingerprints. + * @author nikita */ public class DisplayOtrFingerprint extends AlertDialog.Builder { @@ -62,8 +64,7 @@ /** * Constructor. * @param context context activity. - * @param roster the roster which has the contact you want to delete. - * @param contact the contact to delete. + * @param chat the current chat. */ public DisplayOtrFingerprint(final Context context, final IChat chat) { super(context); diff -r 55e6f3409146 -r f78522cede87 src/net/java/otr4j/OtrException.java --- a/src/net/java/otr4j/OtrException.java Sun Nov 06 00:35:02 2011 +0100 +++ b/src/net/java/otr4j/OtrException.java Sun Nov 06 01:55:51 2011 +0100 @@ -1,6 +1,6 @@ package net.java.otr4j; -@SuppressWarnings("serial") + public class OtrException extends Exception { public OtrException(Exception e){ super(e);