Closed Bug 1268019 Opened 8 years ago Closed 5 years ago

Incorrect icon is displayed for files in Download Manager

Categories

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

48 Branch
ARM
Android
defect

Tracking

(firefox47 unaffected, firefox48 wontfix, firefox49 wontfix, firefox-esr6869+ verified, firefox60 wontfix, firefox62 wontfix, firefox66 wontfix, firefox67 wontfix, firefox67.0.1 wontfix, firefox68+ wontfix, firefox69 verified, firefox70 verified)

VERIFIED FIXED
Firefox 70
Tracking Status
firefox47 --- unaffected
firefox48 --- wontfix
firefox49 --- wontfix
firefox-esr68 69+ verified
firefox60 --- wontfix
firefox62 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox67.0.1 --- wontfix
firefox68 + wontfix
firefox69 --- verified
firefox70 --- verified

People

(Reporter: TeoVermesan, Assigned: brad.arant)

Details

(Whiteboard: [fennec68.1])

Attachments

(5 files, 1 obsolete file)

Tested using:
Device: Sony Xperia Z2 Tablet (Android 5.0.2) and Nexus 9 (Android 6.0)
Steps to reproduce:
1. Open each of the links and download the files:
http://1.usa.gov/deeXKM
http://goo.gl/wC8xy
http://goo.gl/bl0U
2. Open the Download Manager

Expected results:
- Each file has the correct icon of the app associated with the file

Actual results:
- Incorrect icon is displayed.
- Please see the attached screenshot
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
Assignee: nobody → brad.arant

Issue is created by the fact that there is no registered intents for the extension and the system provisions to provide. The existing algorithm will retrieve the list of intent activities and use the first one in the list and retrieve the icon parameters from the intent.

If there are no registered intent activities to support the extension and its related mime type then the list is empty and the algorithm to retrieve the Drawable icon is handed null. In my recreations of the issue I see no icon and have seen grey as well. In either case the Drawable object is invalid and therefore un-displayable.

How should we handle this condition?

  1. We can provide a default generic icon that is displayed for items that do not have an intent activity and return it instead of null on resolution errors leading up to the icon.

  2. We can provide some additional lookups for commonly used extensions and offer better and more specific icons. Its just a matter of definition. An internal table of drawables to return based upon file extensions to be used as default drawable when no intent activities are registered for the extension type.

Perhaps another suggestion?

Attached image Generic File Icon

Please let me know if this is acceptable as a default icon.

Submitting patch for providing a default icon for files that do not have an intent associated with their extensions.

Shows icon on two downloaded files that have no associated app to handle them.

Keywords: checkin-needed

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/572c808b302b
Fix code violation of missing braces on if code block.;r=VladBaicu

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69

[Tracking Requested - why for this release]:

We'll want to uplift this UI fix to Fennec 68, but we can wait until after 68 ESR is branched and ship it in Fennec 68.1.

Should this bug have been closed yet? Looks only one of the patches has landed at this point.

Flags: needinfo?(brad.arant)

Changing the priority to p1 as the bug is tracked by a release manager for the current beta.
See What Do You Triage for more information

Priority: P5 → P1

Brad, it looks like your code violation fix (D34386 in comment 7) landed, but not the default icon fixes themselves (D34220 in comment 6 and D34387 in comment 8). It's probably too late to uplift fixes to Fennec 68 Beta. After your fixes landed in mozilla-central, we can uplift them to Fennec ESR channel for the ESR 68.1 release (2019-09-03).

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #9070670 - Attachment is obsolete: true
Flags: needinfo?(brad.arant)
Keywords: checkin-needed

Please apply D34387. Only first patch applied. After merge I will request Fennec ESR approval.

Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/76b7becd27ac
Return default icon for download files that do not have intent for handling.;r=VladBaicu

Keywords: checkin-needed

Working n the patch to remove extraneous reference.

Flags: needinfo?(brad.arant)

This has been resolved 2 weeks ago, but we haven't get to put the flag. Thanks!

Keywords: checkin-needed

Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/56410364cab0
Return default icon for download files that do not have intent for handling.;r=VladBaicu

Keywords: checkin-needed

We'll want to uplift this fix to Fennec 69 Beta and ESR 68.1. We don't need this fix in a ESR 68.0.x dot release.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: Firefox 69 → Firefox 70

Please nominate this for Beta & ESR68 approval when you get a chance.

Flags: needinfo?(brad.arant)
Flags: qe-verify+

Hello, I can confirm that the issue is fixed on the latest version of Nightly from treeherder (https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&selectedJob=257089020&searchStr=android&revision=c05f610525761ddb7f8bed9927f9f9c45bcb507e).
Devices:

  • Motorola Moto G6 (Android 8);
  • Samsung Galaxy S8 (Android 9);
  • Google Pixel (Android Q);
Flags: qe-verify+

Comment on attachment 9071042 [details]
Bug 1268019 - Return default icon for download files that do not have intent for handling.;r?VladBaicu

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Requested
  • User impact if declined: No icons appear when no intent is there to provide one. The bug.
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Provides a default icon where a NULL value was previously retrieved.
  • String or UUID changes made by this patch: None
Flags: needinfo?(brad.arant)
Attachment #9071042 - Flags: approval-mozilla-esr68?
Attachment #9071041 - Flags: approval-mozilla-esr68?

Comment on attachment 9071042 [details]
Bug 1268019 - Return default icon for download files that do not have intent for handling.;r?VladBaicu

Beta/Release Uplift Approval Request

  • User impact if declined: Icon will not appear for items not having an intent. The bug.
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Provides a default drawable where NULL was formerly returned.
  • String changes made/needed: none
Attachment #9071042 - Flags: approval-mozilla-beta?
Attachment #9071041 - Flags: approval-mozilla-beta?

Comment on attachment 9071041 [details]
Bug 1268019 - Fix code violation of missing braces on if code block.;r?VladBaicu

Fixes missing icons in the Fennec download manager. Note that the first patch landed on m-c when it was still tracking 69 and doesn't need uplift to Beta. Approved for Fennec 68.1b3.

Attachment #9071041 - Flags: approval-mozilla-esr68?
Attachment #9071041 - Flags: approval-mozilla-esr68+
Attachment #9071041 - Flags: approval-mozilla-beta?
Attachment #9071042 - Flags: approval-mozilla-esr68?
Attachment #9071042 - Flags: approval-mozilla-esr68+
Attachment #9071042 - Flags: approval-mozilla-beta?
Attachment #9071042 - Flags: approval-mozilla-beta+
Attachment #9071041 - Flags: approval-mozilla-beta?

Comment on attachment 9071041 [details]
Bug 1268019 - Fix code violation of missing braces on if code block.;r?VladBaicu

As I said before, this patch is already on Beta based on when it landed on m-c.

Attachment #9071041 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

Hi!
Verified as fixed on ESR 68.1b3, Beta 69.0b7 with OnePlus 5T (Android 9), HTC 10 (Android 8.0.0).
I will mark this issue as verified on Firefox esr68 and Firefox 69. Thanks!

Status: RESOLVED → VERIFIED
Whiteboard: [fennec68.1]
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: