mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Improve logging around sessions.
This commit is contained in:
@@ -39,7 +39,7 @@ public class TextSecureSessionStore implements SignalServiceSessionStore {
|
||||
SessionRecord sessionRecord = DatabaseFactory.getSessionDatabase(context).load(address);
|
||||
|
||||
if (sessionRecord == null) {
|
||||
Log.w(TAG, "No existing session information found.");
|
||||
Log.w(TAG, "No existing session information found for " + address);
|
||||
return new SessionRecord();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class TextSecureSessionStore implements SignalServiceSessionStore {
|
||||
}
|
||||
|
||||
if (sessionRecords.stream().anyMatch(Objects::isNull)) {
|
||||
throw new NoSessionException("Failed to find at least one session.");
|
||||
throw new NoSessionException("Failed to find one or more sessions.");
|
||||
}
|
||||
|
||||
return sessionRecords;
|
||||
@@ -87,6 +87,7 @@ public class TextSecureSessionStore implements SignalServiceSessionStore {
|
||||
@Override
|
||||
public void deleteSession(SignalProtocolAddress address) {
|
||||
synchronized (LOCK) {
|
||||
Log.w(TAG, "Deleting session for " + address);
|
||||
DatabaseFactory.getSessionDatabase(context).delete(address);
|
||||
}
|
||||
}
|
||||
@@ -94,6 +95,7 @@ public class TextSecureSessionStore implements SignalServiceSessionStore {
|
||||
@Override
|
||||
public void deleteAllSessions(String name) {
|
||||
synchronized (LOCK) {
|
||||
Log.w(TAG, "Deleting all sessions for " + name);
|
||||
DatabaseFactory.getSessionDatabase(context).deleteAllFor(name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user