-
Notifications
You must be signed in to change notification settings - Fork 626
Clean up/remove failed or completed download attempts. #2298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Removes old download attempts from the download managers and resets the models in shared preferences.
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with Head commit (fe589c4e) is created by Prow via merging commits: cdf06e2 6b8fc96. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (fe589c4e) is created by Prow via merging commits: cdf06e2 6b8fc96. |
if (downloadManager != null && downloadId != 0) { | ||
downloadManager.remove(downloadId); | ||
} | ||
sharedPreferencesUtil.setFailedUploadedCustomModelDetails(modelName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From reading this function I get the impression that we only removeOrCancel failed uploaded custom models. Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also immediately after a successful download has it's file transferred ( after moveModelToDestinationFolder is called)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. The setFailedUploadedCustomModelDetails
seems to imply that it's for failure only.
.../src/main/java/com/google/firebase/ml/modeldownloader/internal/ModelFileDownloadService.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/google/firebase/ml/modeldownloader/internal/ModelFileDownloadService.java
Show resolved
Hide resolved
.../src/main/java/com/google/firebase/ml/modeldownloader/internal/ModelFileDownloadService.java
Show resolved
Hide resolved
* Clean up/remove failed or completed download attempts. Removes old download attempts from the download managers and resets the models in shared preferences. * fix guarded by issues * minor updates
Removes old download attempts from the download managers and resets the models in shared preferences.