--- 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());
}
}
}
--- 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
*
*/
--- 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)