Closed
Bug 1506649
Opened 6 years ago
Closed 5 years ago
Opening files from external storage should be supported too.
Categories
(Firefox for Android Graveyard :: General, enhancement, P1)
Tracking
(relnote-firefox 66+, firefox66 verified)
RESOLVED
FIXED
Firefox 66
People
(Reporter: andrei.a.lazar, Assigned: JanH)
References
Details
Attachments
(3 files, 1 obsolete file)
Updated•6 years ago
|
Hardware: Unspecified → ARM
Version: unspecified → Trunk
Reporter | ||
Comment 1•5 years ago
|
||
Trying to obtain the real path for a file located on the SD CARD will fail so we are going to stream the data in a temporary file and make use of that path instead.
Updated•5 years ago
|
Attachment #9030239 -
Attachment is obsolete: true
Assignee | ||
Updated•5 years ago
|
Assignee: andrei.a.lazar → jh+bugzilla
Hardware: ARM → All
Assignee | ||
Comment 2•5 years ago
|
||
Instead, getOriginalFilePathFromUri() will simply *always* return null if it cannot divine the original file path, and consequently resolveContentUri() will then always fall back to the temp file method if getOriginalFilePathFromUri() returns null.
Assignee | ||
Comment 3•5 years ago
|
||
Because getOriginalFilePathFromUri() doesn't use framework methods newer than Kitkat, instead of a generic @SuppressLint("NewAPI") it would be better to use @TargetApi(19), so you still get warned if you start using framework methods more recent than API19. However because the isKitkat helper variable is only used in one place, in the end we simply replace it with a direct Build.VERSION.SDK_INT check, so that we don't have to use any special handling for the linter.
Assignee | ||
Comment 4•5 years ago
|
||
The AOSP ExternalStorageProvider always creates document IDs of the form "storage device ID" + ':' + "document path", where the storage device ID will be "primary" for the primary emulated storage and the file system UUID for everything else. Assuming that OEMs won't customise this behaviour, the main problem that needs to be handled is how to turn the file system UUID back into a file system path.
Pushed by mozilla@buttercookie.de: https://hg.mozilla.org/integration/autoland/rev/242e66d84734 Part 1: Avoid exeception-based control-flow for resolving content://-URIs. r=snorp https://hg.mozilla.org/integration/autoland/rev/fd078630d666 Part 2: Better API version linting. r=snorp https://hg.mozilla.org/integration/autoland/rev/5651b431fe2c Part 3: Guess ExternalStorageProvider file paths for non-primary volumes. r=snorp
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/242e66d84734 https://hg.mozilla.org/mozilla-central/rev/fd078630d666 https://hg.mozilla.org/mozilla-central/rev/5651b431fe2c
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
Updated•5 years ago
|
Flags: needinfo?(sorina.florean)
Comment 7•5 years ago
|
||
Verified as fixed on latest Nightly build (67.0a1) and Beta build (66.0b3).
Flags: needinfo?(sorina.florean)
Comment 8•5 years ago
|
||
Release note added for 66: Added support to open files from external storage, such as an SD card.
relnote-firefox:
--- → 66+
Assignee | ||
Comment 9•5 years ago
|
||
This bug was only about the built-in Android file explorer - with other file explorer apps or through manually browsing to the file location from within Firefox we have been able to open files on external storages for a long time. So I'm not sure this really warrants a release note, at least with this phrasing?
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•