Closed
Bug 1043136
Opened 11 years ago
Closed 11 years ago
Add device storage API support to permissions prompt
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 34
People
(Reporter: jchen, Assigned: jchen)
Details
Attachments
(4 files)
1.20 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
2.67 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
3.87 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
112.95 KB,
image/png
|
Details |
Right now the permissions prompt fails when using device storage API
Assignee | ||
Comment 1•11 years ago
|
||
Requests with access property use a permission that's a combination of the type and the access.
Attachment #8464015 -
Flags: review?(mark.finkle)
Comment 2•11 years ago
|
||
Comment on attachment 8464015 [details] [diff] [review]
Handle access in permission prompt (v1)
I assume this won't break other permission prompts coming into this code path?
Attachment #8464015 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Similar to b2g [1], when a permission has unknown action, we should only prompt the user for certain permissions. For permissions like contacts and device-storage, we should default to deny and not prompt. This only applies to web content. For web apps, all unknown permissions are denied by default.
[1] http://mxr.mozilla.org/mozilla-central/source/b2g/components/ContentPermissionPrompt.js#16
Attachment #8464016 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 4•11 years ago
|
||
Add permission strings for device storage. Asking Ian to review the string wording.
Attachment #8464017 -
Flags: review?(mark.finkle)
Attachment #8464017 -
Flags: review?(ibarlow)
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #2)
> Comment on attachment 8464015 [details] [diff] [review]
> Handle access in permission prompt (v1)
>
> I assume this won't break other permission prompts coming into this code
> path?
Right. Existing permissions like geolocation don't have the access property and are not affected.
Comment 6•11 years ago
|
||
Jim, can you please provide a little more context about what this is, why we're doing it, and when/how a user might see such a prompt?
Comment 7•11 years ago
|
||
Comment on attachment 8464016 [details] [diff] [review]
Only prompt for certain permissions when action is unknown (v1)
># HG changeset patch
># User Jim Chen <nchen@mozilla.com>
>
>Bug 1043136 - Only prompt for certain permissions when action is unknown;
>
>diff --git a/mobile/android/components/ContentPermissionPrompt.js b/mobile/android/components/ContentPermissionPrompt.js
>- if (isApp && (result == Ci.nsIPermissionManager.UNKNOWN_ACTION && !!kEntities[type])) {
>+ if (denyUnknown && result == Ci.nsIPermissionManager.UNKNOWN_ACTION) {
I was worried about this change, but as you say, "contacts" is already defaulting to DENY and I assume somewhere "device-storage" is as well. That leaves "desktop-notification" and "geolocation", which you handle with the PROMPT_FOR_UNKNOWN check.
Attachment #8464016 -
Flags: review?(mark.finkle) → review+
Updated•11 years ago
|
Attachment #8464017 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Ian Barlow (:ibarlow) from comment #6)
> Jim, can you please provide a little more context about what this is, why
> we're doing it, and when/how a user might see such a prompt?
This is for the Device Storage API, which is a web API we're enabling to have parity with B2G. The purpose of this API is to let web apps access the user's pictures, music, videos, etc. For example, a web app can display the user's existing pictures, or it can save pictures to the user's pictures directory.
When a web app uses this API, the user will be prompted for permission, similar to geolocation, etc. The strings added here will be what's shown to the user.
Assignee | ||
Comment 9•11 years ago
|
||
Here is a screenshot of a web app requesting access to device storage.
Assignee | ||
Comment 10•11 years ago
|
||
Ian, see comment 8 and comment 9. Just wanted to make sure the wording of the prompts in attachment 8464017 [details] [diff] [review] looks okay.
Flags: needinfo?(ibarlow)
Comment 11•11 years ago
|
||
Oh hey Jim, thanks for the nudge. Lost this bug in my inbox :P
This looks good overall. One question / comment:
What do you think about saying "SD card" instead of "external storage"? Currently it seems a bit unspecific to me, I'm curious if we can be clearer about what the website is asking for?
Flags: needinfo?(ibarlow)
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Ian Barlow (:ibarlow) from comment #11)
> Oh hey Jim, thanks for the nudge. Lost this bug in my inbox :P
>
> This looks good overall. One question / comment:
>
> What do you think about saying "SD card" instead of "external storage"?
> Currently it seems a bit unspecific to me, I'm curious if we can be clearer
> about what the website is asking for?
Thanks! My only concern is many devices don't use SD cards and use non-removable storage instead. "External storage" seems to be the Android lingo for "either the SD card or the non-removable storage".
Comment 13•11 years ago
|
||
Oh, ok. If that's pretty standard terminology then i would be cool to just go with that then. Especially if "SD card" wouldn't be a universally accurate phrase.
Assignee | ||
Comment 14•11 years ago
|
||
Comment on attachment 8464017 [details] [diff] [review]
Add permission prompt for device storage API (v1)
Thanks Ian!
Attachment #8464017 -
Flags: review?(ibarlow)
Assignee | ||
Comment 15•11 years ago
|
||
Keywords: checkin-needed
Comment 16•11 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/1f3a810aed3e
https://hg.mozilla.org/integration/fx-team/rev/44055cccb7b8
https://hg.mozilla.org/integration/fx-team/rev/9879b02bd7c4
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 17•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1f3a810aed3e
https://hg.mozilla.org/mozilla-central/rev/44055cccb7b8
https://hg.mozilla.org/mozilla-central/rev/9879b02bd7c4
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Updated•4 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
•