mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-06 21:35:46 +01:00
Fix local backup restore AEP handling and conditional re-enable.
This commit is contained in:
committed by
Cody Henthorne
parent
c7a6c7ad9e
commit
78d3db319c
@@ -39,6 +39,7 @@ import org.thoughtcrime.securesms.backup.v2.RestoreV2Event
|
||||
import org.thoughtcrime.securesms.backup.v2.local.ArchiveFileSystem
|
||||
import org.thoughtcrime.securesms.conversation.v2.registerForLifecycle
|
||||
import org.thoughtcrime.securesms.jobs.RestoreLocalAttachmentJob
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.registration.ui.shared.RegistrationScreen
|
||||
import java.io.File
|
||||
@@ -152,10 +153,15 @@ class QuickstartRestoreActivity : BaseActivity() {
|
||||
|
||||
// Import directly via BackupRepository, bypassing SnapshotFileSystem/LocalArchiver
|
||||
// to avoid DocumentFile.findFile name-matching issues
|
||||
val backupKey = SignalStore.backup.messageBackupKey
|
||||
val backupId = backupKey.deriveBackupId(selfData.aci)
|
||||
|
||||
val importResult = BackupRepository.importLocal(
|
||||
mainStreamFactory = { FileInputStream(mainFile) },
|
||||
mainStreamLength = mainFile.length(),
|
||||
selfData = selfData
|
||||
selfData = selfData,
|
||||
backupId = backupId,
|
||||
messageBackupKey = backupKey
|
||||
)
|
||||
|
||||
Log.i(TAG, "Import result: $importResult")
|
||||
|
||||
Reference in New Issue
Block a user