Closed Bug 1220145 Opened 9 years ago Closed 9 years ago

DownloadContentService: Check space on disk before downloading content

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: sebastian, Assigned: sebastian, Mentored)

References

Details

Attachments

(1 file, 1 obsolete file)

The catalog of downloadable content contains the byte size of items. We should check whether we have enough available disk space before downloading any content.
Mentor: s.kaspari
Bug 1220145 - DownloadContentService: Check space on disk before downloading content. r?sebastian
Attachment #8683126 - Flags: review?(s.kaspari)
Assignee: nobody → mrjohnsonalex
Attachment #8683126 - Flags: review?(s.kaspari)
Comment on attachment 8683126 [details] MozReview Request: Bug 1220145 - DownloadContentService: Check space on disk before downloading content. r?sebastian https://reviewboard.mozilla.org/r/24195/#review21923 Hi Alex! Thank you for your patch. Unfortunately there has been a misunderstanding here. This bug is about adding this functionality to DownloadContentService - a new service that will be added in bug 1197720 and has not landed yet. I assume your patch is intended to check the disk space before downloading files from the web? This is also an interesting idea and you could just file a new bug for that (I couldn't find a duplicate for that) and discuss your patch there.
Resetting assignee until we can take action here. @Alex: You can still work on this after the service has been added in bug 1220145, if you like. However this will take some more time.
Assignee: mrjohnsonalex → nobody
(In reply to Sebastian Kaspari (:sebastian) from comment #3) > Resetting assignee until we can take action here. > > @Alex: You can still work on this after the service has been added in bug > 1220145, if you like. However this will take some more time. I would still like to work on this.
Attachment #8683126 - Attachment is obsolete: true
(In reply to Alex Johnson (:alex_johnson) from comment #4) > (In reply to Sebastian Kaspari (:sebastian) from comment #3) > > Resetting assignee until we can take action here. > > > > @Alex: You can still work on this after the service has been added in bug > > 1220145, if you like. However this will take some more time. > > I would still like to work on this. Sorry, for stealing this bug away. I have a bunch of patches for DownloadContentService in the making and they all build up on each other.
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Comment on attachment 8700343 [details] MozReview Request: Bug 1220145 - DownloadContentService: Check space on disk before downloading content. r?rnewman https://reviewboard.mozilla.org/r/28703/#review25757 ::: mobile/android/base/java/org/mozilla/gecko/dlc/DownloadAction.java:326 (Diff revision 1) > + if (destinationDirectory.getUsableSpace() < content.getSize() * 2) { The Charis fonts compress down by 68% -- 1.6MB turns into 540KB. You should probably make this `* 3`.
Attachment #8700343 - Flags: review?(rnewman) → review+
(In reply to Richard Newman [:rnewman] from comment #7) > The Charis fonts compress down by 68% -- 1.6MB turns into 540KB. You should > probably make this `* 3`. getSize() returns the uncompressed size of the content. So this should be 1.6MB * 2 = 3.2MB here. Assuming that the compressed files are always smaller we should be good.
https://hg.mozilla.org/integration/fx-team/rev/ffef281f87e208e77cf5142590982c02e875767b Bug 1220145 - DownloadContentService: Check space on disk before downloading content. r=rnewman
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: