Closed Bug 1001129 Opened 10 years ago Closed 10 years ago

Clicking Download icon is required in nightly, no error feedback

Categories

(Firefox for Android Graveyard :: Download Manager, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(fennec30+)

RESOLVED FIXED
Firefox 32
Tracking Status
fennec 30+ ---

People

(Reporter: ozten, Assigned: wesj)

References

Details

Attachments

(2 files)

I wanted to download and install an .apk.

In nightly, Android asks me to use "Downloader" to download it.

Several times I didn't actually click the Downloader icon and just hit "once" or "evertime".

This dismisses the dialog without downloading anything, leaving me very confused.

Expected - either pre-select the icon or give the user feedback that they need to click the icon. We shouldn't silently close the dialog.
tracking-fennec: --- → ?
tracking-fennec: ? → 30+
Let's get the "Download" intent selected by default.

Filing a separate bug for fixing this with a banner.
Blocks: 1004553
Err.. I did this the other way around. I'm not a big fan of the "banner" idea. I'd like to try and reduce the number of UI's we have for what is essentially "Intent" selection rather than grow it.
Assignee: nobody → wjohnston
Attached patch PatchSplinter Review
This forces us to have a default selection in GridViews. There was already code here for this (sorta)! What we refer to as selected is actually checked to Android, so even if we did select something, it wasn't working.
Attachment #8418543 - Flags: review?(mark.finkle)
Comment on attachment 8418543 [details] [diff] [review]
Patch

We should probably try to uplift this
Attachment #8418543 - Flags: review?(mark.finkle) → review+
Re-land?
The android docs lie. This method is only implemented on ics plus. I've been trying to reflect out an alternative for older version (setSelectedPositionInt()). Almost there, but if it fails, we'll still have this item "selected". It just won't appear that way visually.
Attached patch Patch v2Splinter Review
This just wraps this call in a version check.

I tried reflecting out setSelectedPositionInt from AdapterView:

http://androidxref.com/2.3.6/xref/frameworks/base/core/java/android/widget/AdapterView.java#1086

but we don't actually style the "selected" item like I'd hoped. A quick attempt to do that failed, and I decided it wasn't worth putting a lot of time into. Happy to try more if I'm wrong.

For any interested reader, you might think that setSelection would do the same thing for you:

http://developer.android.com/reference/android/widget/AdapterView.html#setSelection%28int%29

It turns out, setSelection is does nothing on Android for devices that are "inTouchMode" (i.e. devices with touch screens). I assume that's some UX decision that you shouldn't be able to programmatically set the selection if  user could touch a widget, but I haven't found any good explanations from any Android engineers. Just lots of code paths that dead end in inTouchMode checks.
Attachment #8426431 - Flags: review?(mark.finkle)
Comment on attachment 8426431 [details] [diff] [review]
Patch v2

Will this patch set all intent chooser dialogs to select the first item? I see mSelected inited to 0. Shouldn't we leave mSelected: -1 ?

We only want the HelperAppDialog to do this, and you are setting |selected: true| there.
Comment on attachment 8426431 [details] [diff] [review]
Patch v2

Wes and I chatted on IRC. On ICS+, the item we selected will actually appear selected.

I do want the | mSelected: 0 | part reverted for now. I like being explicit about selecting by default. We can change our minds later too.
Attachment #8426431 - Flags: review?(mark.finkle) → review+
Also made sure we don't try to select if mSelection == -1
https://hg.mozilla.org/integration/fx-team/rev/fb993f33e948
https://hg.mozilla.org/mozilla-central/rev/fb993f33e948
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
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: