feat: Data transfer support - #3058
Open
LouisCAD wants to merge 5 commits into
Open
Conversation
…rt token derivation" This reverts commit 37cd33c.
There was a problem hiding this comment.
Pull request overview
Enables cloud backup and device-to-device migration while aligning account access with updated Core APIs.
Changes:
- Configures Android backup and extraction rules.
- Adds custom Realm-file backup and restoration.
- Migrates account consumers to suspend-based APIs.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
app/src/main/AndroidManifest.xml |
Enables and configures full backup. |
app/src/main/res/xml/data_extraction_rules.xml |
Defines modern backup and transfer data. |
app/src/main/res/xml/backup_rules.xml |
Defines legacy full-backup data. |
app/src/main/java/com/infomaniak/mail/backup/MailFullBackupAgent.kt |
Handles Realm backup and restoration. |
app/src/main/java/com/infomaniak/mail/utils/AccountUtils.kt |
Integrates updated credential management. |
app/src/main/java/com/infomaniak/mail/TokenInterceptorListenerProvider.kt |
Adapts token listener construction. |
app/src/main/java/com/infomaniak/mail/workers/SyncMailboxesWorker.kt |
Uses suspend account retrieval. |
app/src/main/java/com/infomaniak/mail/ui/newMessage/NewMessageViewModel.kt |
Updates multi-mailbox lookup. |
app/src/main/java/com/infomaniak/mail/ui/newMessage/selectMailbox/SelectMailboxViewModel.kt |
Updates account loading. |
app/src/main/java/com/infomaniak/mail/ui/main/user/SwitchUserViewModel.kt |
Updates account switching data retrieval. |
Suppressed comments (2)
app/src/main/res/xml/data_extraction_rules.xml:22
- This exact-file include omits SQLite's
user_database-walsidecar. A committed account or refreshed API token may still reside only in that WAL, so cloud restore can produce a stale database and fail the promised seamless login. Back up a coordinated SQLite snapshot—either checkpoint/close the Room database before backup or include the required sidecars consistently.
<include domain="database" path="user_database" />
app/src/main/res/xml/backup_rules.xml:21
- The legacy full-backup rules also upload
user_database, which containsUser.apiToken, without requiring client-side encryption. This applies to supported Android 8.1 devices where encrypted cloud backup is not guaranteed. Gate this include withclientSideEncryption(or restrict it to device-to-device transfer) rather than exporting authentication credentials unconditionally.
<include domain="database" path="user_database" />
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <!-- path="datastore/" />--> | ||
| <include domain="sharedpref" path="." /> | ||
| <include domain="file" path="datastore/" /> | ||
| <include domain="database" path="user_database" /> |
| <full-backup-content> | ||
| <include domain="sharedpref" path="." /> | ||
| <include domain="file" path="datastore/" /> | ||
| <include domain="database" path="user_database" /> |
Contributor
Author
There was a problem hiding this comment.
@copilot Do you have a source to this issue that you claim affects API 27 to 30?
Compilation of Java sources isn't enabled in this module.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Will allow the app to be restored seamlessly from a device backup, or on device migration.