Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
d944d5fa
Commit
d944d5fa
authored
Nov 08, 2016
by
pedroGitt
Browse files
Update initInboundSessionWithAccountFrom() return code:
- return code is a basic error code (0 OK, -1 KO) Remove TODO comments
parent
1fd908c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmSession.java
View file @
d944d5fa
...
...
@@ -267,21 +267,18 @@ public class OlmSession extends CommonSerializeUtils implements Serializable {
* @param aAccount the account to associate with this session
* @param aTheirIdentityKey the sender identity key
* @param aPreKeyMsg PRE KEY message
* @return this if operation succeed, null otherwise
* TODO unit test missing: initInboundSessionWithAccountFrom
* @return 0 if operation succeed, -1 otherwise
*/
public
OlmSession
initInboundSessionWithAccountFrom
(
OlmAccount
aAccount
,
String
aTheirIdentityKey
,
String
aPreKeyMsg
)
{
OlmSession
retObj
=
null
;
public
int
initInboundSessionWithAccountFrom
(
OlmAccount
aAccount
,
String
aTheirIdentityKey
,
String
aPreKeyMsg
)
{
int
retCode
=-
1
;
if
((
null
==
aAccount
)
||
TextUtils
.
isEmpty
(
aPreKeyMsg
)){
Log
.
e
(
LOG_TAG
,
"## initInboundSessionWithAccount(): invalid input parameters"
);
}
else
{
if
(
0
==
initInboundSessionFromIdKeyJni
(
aAccount
.
getOlmAccountId
(),
aTheirIdentityKey
,
aPreKeyMsg
)){
retObj
=
this
;
}
retCode
=
initInboundSessionFromIdKeyJni
(
aAccount
.
getOlmAccountId
(),
aTheirIdentityKey
,
aPreKeyMsg
);
}
return
ret
Obj
;
return
ret
Code
;
}
private
native
int
initInboundSessionFromIdKeyJni
(
long
aOlmAccountId
,
String
aTheirIdentityKey
,
String
aOneTimeKeyMsg
);
...
...
@@ -305,7 +302,6 @@ public class OlmSession extends CommonSerializeUtils implements Serializable {
* Public API for {@link #matchesInboundSessionJni(String)}.
* @param aOneTimeKeyMsg PRE KEY message
* @return this if operation succeed, null otherwise
* TODO unit test missing: matchesInboundSession
*/
public
boolean
matchesInboundSession
(
String
aOneTimeKeyMsg
)
{
boolean
retCode
=
false
;
...
...
@@ -326,7 +322,6 @@ public class OlmSession extends CommonSerializeUtils implements Serializable {
* @param aTheirIdentityKey the sender identity key
* @param aOneTimeKeyMsg PRE KEY message
* @return this if operation succeed, null otherwise
* TODO unit test missing: matchesInboundSessionFrom
*/
public
boolean
matchesInboundSessionFrom
(
String
aTheirIdentityKey
,
String
aOneTimeKeyMsg
)
{
boolean
retCode
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment