Don't show file picker for "Save Page as PDF" on Android

VERIFIED FIXED

Status

Firefox for Android Graveyard
General
VERIFIED FIXED
8 years ago
5 years ago

People

(Reporter: mbrubeck, Assigned: mbrubeck)

Tracking

Trunk
All
Android

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
We should just save PDFs to the default download folder, at least on Android.  (See also bug 593408, for "Save Image" and "Save Link.")
(Assignee)

Comment 1

8 years ago
Created attachment 474728 [details] [diff] [review]
patch

This is mostly working - it hides the file picker on Android, and both code paths work fine on desktop.  The "download" never finishes on Android, though - possibly for some unrelated reason.
(Assignee)

Comment 2

8 years ago
Comment on attachment 474728 [details] [diff] [review]
patch

This patch is good; filed followup bug 595919 for the new error on Android.
Attachment #474728 - Attachment description: WIP → patch
Attachment #474728 - Flags: review?(mark.finkle)
(Assignee)

Updated

8 years ago
tracking-fennec: --- → ?
Comment on attachment 474728 [details] [diff] [review]
patch

>diff -r cb86fc4a74bf chrome/content/browser-ui.js

>+    let file;
>+#ifdef ANDROID
>+    file = downloadsDir.clone();
>+    file.append(fileName);
>+#else

Let's just keep the "let" with the variable

#ifdef ANDROID
    let file = downloadsDir.clone();
    file.append(fileName);
#else


>+    file = picker.file;
>+#endif

and here:

    let file = picker.file;
#endif
Attachment #474728 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 4

8 years ago
(In reply to comment #3)
> Let's just keep the "let" with the variable

Fixed and pushed: http://hg.mozilla.org/mobile-browser/rev/cc98b92ce4e0
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
PDFs are saved to sdcard/download as expected. Also there are no more issues during the downloading process on the latest Nightly build.

Verified fixed on:
Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110913
Firefox/9.0a1 Fennec/9.0a1
Device: Samsung Galaxy S
OS: Android 2.2
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.