Don't rely on the SessionState protobuf.

Instead use the convenient deserialization constructor
fork-5.53.8
Jack Lloyd 2020-12-10 10:23:13 -05:00 zatwierdzone przez Alan Evans
rodzic 7f1e33be32
commit d2d698f64e
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -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) {