mirror of
https://github.com/oxen-io/session-android.git
synced 2025-11-10 08:44:58 +00:00
Javadocs, and some minor refactoring.
This commit is contained in:
@@ -26,7 +26,7 @@ public class SessionUtil {
|
||||
|
||||
return
|
||||
sessionStore.contains(recipientId, deviceId) &&
|
||||
!sessionStore.get(recipientId, deviceId).getSessionState().getNeedsRefresh();
|
||||
!sessionStore.load(recipientId, deviceId).getSessionState().getNeedsRefresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TextSecureSessionStore implements SessionStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SessionRecord get(long recipientId, int deviceId) {
|
||||
public SessionRecord load(long recipientId, int deviceId) {
|
||||
synchronized (FILE_LOCK) {
|
||||
try {
|
||||
FileInputStream input = new FileInputStream(getSessionFile(recipientId, deviceId));
|
||||
@@ -45,7 +45,7 @@ public class TextSecureSessionStore implements SessionStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(long recipientId, int deviceId, SessionRecord record) {
|
||||
public void store(long recipientId, int deviceId, SessionRecord record) {
|
||||
try {
|
||||
RandomAccessFile sessionFile = new RandomAccessFile(getSessionFile(recipientId, deviceId), "rw");
|
||||
FileChannel out = sessionFile.getChannel();
|
||||
@@ -63,7 +63,7 @@ public class TextSecureSessionStore implements SessionStore {
|
||||
@Override
|
||||
public boolean contains(long recipientId, int deviceId) {
|
||||
return getSessionFile(recipientId, deviceId).exists() &&
|
||||
get(recipientId, deviceId).getSessionState().hasSenderChain();
|
||||
load(recipientId, deviceId).getSessionState().hasSenderChain();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user