Don't rely on the SessionState protobuf.

Instead use the convenient deserialization constructor
This commit is contained in:
Jack Lloyd
2020-12-10 10:23:13 -05:00
committed by Alan Evans
parent 7f1e33be32
commit d2d698f64e

View File

@@ -11,7 +11,6 @@ import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.database.SessionDatabase;
import org.whispersystems.libsignal.state.SessionRecord;
import org.whispersystems.libsignal.state.SessionState;
import org.whispersystems.libsignal.state.StorageProtos.SessionStructure;
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
import java.io.File;
@@ -65,8 +64,7 @@ class SessionStoreMigrationHelper {
if (versionMarker == SINGLE_STATE_VERSION) {
Log.i(TAG, "Migrating single state version: " + sessionFile.getAbsolutePath());
SessionStructure sessionStructure = SessionStructure.parseFrom(serialized);
SessionState sessionState = new SessionState(sessionStructure);
SessionState sessionState = new SessionState(serialized);
sessionRecord = new SessionRecord(sessionState);
} else if (versionMarker >= ARCHIVE_STATES_VERSION) {