# HG changeset patch # User Nikita Kozlov # Date 1320541503 -3600 # Node ID 961b324cf4ddaeec0b494427ac56521eb24ec67f # Parent f78522cede879d01ada0d78bb24870bb54edb8e5 checkstyle diff -r f78522cede87 -r 961b324cf4dd src/com/beem/project/beem/otr/BeemOtrManager.java --- a/src/com/beem/project/beem/otr/BeemOtrManager.java Sun Nov 06 01:55:51 2011 +0100 +++ b/src/com/beem/project/beem/otr/BeemOtrManager.java Sun Nov 06 02:05:03 2011 +0100 @@ -112,7 +112,7 @@ } /** - * get the fingerprint of the remote part + * get the fingerprint of the remote part. * @param sessionID the otr session * @return a string containing the fingerprint */ @@ -121,7 +121,7 @@ } /** - * set the remote fingerprint as verified + * set the remote fingerprint as verified. * @param sessionId the current otr session */ public void verifyRemoteFingerprint(final SessionID sessionId) { @@ -129,7 +129,7 @@ } /** - * remove the remote fingerprint from verified fingerprints + * unsetthe remote fingerprint as verified. * @param sessionId the current otr session */ public void unverifyRemoteFingerprint(final SessionID sessionId) { @@ -137,7 +137,7 @@ } /** - * get the local fingerprint + * get the local fingerprint. * @param sessionID the otr session * @return a string containing the fingerprint */ @@ -193,15 +193,17 @@ if (status.equals(SessionStatus.ENCRYPTED) && mOtrKeyManager.isVerified(sessionID)) { mChats.get(sessionID).otrStateChanged("AUTHENTICATED"); - } else if (status.equals(SessionStatus.FINISHED)) { - try { - mChats.get(sessionID).localEndOtrSession(); - } catch (OtrException e) { - e.printStackTrace(); + } else { + if (status.equals(SessionStatus.FINISHED)) { + try { + mChats.get(sessionID).localEndOtrSession(); + } catch (OtrException e) { + e.printStackTrace(); + } } + else + mChats.get(sessionID).otrStateChanged(status.toString()); } - else - mChats.get(sessionID).otrStateChanged(status.toString()); } } } diff -r f78522cede87 -r 961b324cf4dd src/com/beem/project/beem/service/BeemChatManager.java --- a/src/com/beem/project/beem/service/BeemChatManager.java Sun Nov 06 01:55:51 2011 +0100 +++ b/src/com/beem/project/beem/service/BeemChatManager.java Sun Nov 06 02:05:03 2011 +0100 @@ -338,7 +338,7 @@ } /** - * implement a roster listener, is used to detect and close otr chats + * implement a roster listener, is used to detect and close otr chats. * @author nikita * */ diff -r f78522cede87 -r 961b324cf4dd src/com/beem/project/beem/service/ChatAdapter.java --- a/src/com/beem/project/beem/service/ChatAdapter.java Sun Nov 06 01:55:51 2011 +0100 +++ b/src/com/beem/project/beem/service/ChatAdapter.java Sun Nov 06 02:05:03 2011 +0100 @@ -308,7 +308,7 @@ } /** - * log a message + * log a message. * @param message message to log */ private void logMessage(com.beem.project.beem.service.Message message) { @@ -319,7 +319,7 @@ } /** - * encrypt a message with an otr session + * encrypt a message with an otr session. * @param unencrypted message with cleartext body * @return message with encrypted body */ @@ -449,6 +449,7 @@ /** * end an Otr session. * @return false if something bad happened. + * @throws OtrException an exception from otr */ public boolean localEndOtrSession() throws OtrException { if (mOtrSessionId == null)