fix: On Xiaomi phone, lastModified is wrong so we fallback on the current time#2017
fix: On Xiaomi phone, lastModified is wrong so we fallback on the current time#2017
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to mitigate incorrect lastModified timestamps on (some) Xiaomi devices by clamping future-dated timestamps back to “now”, and then using that value when building upload requests / paths.
Changes:
- Introduces
UploadFile.getLastModified()to clampfileModifiedAtwhen it’s in the future. - Uses the new clamped value for dated subfolder creation and for upload request parameters.
- Updates the Sentry skip condition for
ACTION_OPEN_DOCUMENTerrors to use the new last-modified accessor.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| app/src/main/java/com/infomaniak/drive/data/services/UploadWorker.kt | Uses the new last-modified accessor in the Sentry ignore condition. |
| app/src/main/java/com/infomaniak/drive/data/models/UploadFile.kt | Adds getLastModified() and uses it to build dated subfolders. |
| app/src/main/java/com/infomaniak/drive/data/api/UploadTask.kt | Uses the new last-modified accessor for direct uploads and upload sessions. |
| app/src/main/java/com/infomaniak/drive/data/api/ApiRepository.kt | Uses the new last-modified accessor for empty-file direct uploads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



No description provided.