Closed Bug 880661 Opened 7 years ago Closed 7 years ago

The download complete notification doesn't appear in the Android notification bar

Categories

(Firefox for Android :: General, defect)

24 Branch
ARM
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 24
Tracking Status
firefox24 --- verified

People

(Reporter: TeoVermesan, Assigned: fedepaol)

References

Details

(Keywords: regression)

Attachments

(1 file)

Build: Firefox for Android 24.0a1 (2013-06-06)
Device: LG Nexus 4 
OS: Android 4.2.2

Steps to Reproduce:
1. Open Firefox
2. Go to ftp://ftp.mozilla.org/pub/mobile and download any build

Expected:
- A notification should appear in the Android notification bar showing that the download is completed.

Actual:
- Only the download progress notification appears in the Android notification bar. After the download is complete, the notification disappears.
I reproduced this. I can't recall, did we ever have a download complete notification? Is this a regression? If so, Teodora can you find a window?
Flags: needinfo?(bnicholson)
(In reply to Aaron Train [:aaronmt] from comment #1)
> I reproduced this. I can't recall, did we ever have a download complete
> notification? Is this a regression?

Yeah, we definitely had a static notification when the download completed. Clicking this notification should launch the file.
Flags: needinfo?(bnicholson)
Flags: needinfo?(teodora.vermesan)
The regressionwindow-wanted:
1. mozilla central:
good build: 30.05.2013 
bad build:  31.05.2013 

pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f66d956d188e&tochange=3c6f2394995d

2.inbound:
good build: 1369914873
bad build:  1369915832

pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4fe5735bca9e&tochange=75407626ba46
Flags: needinfo?(teodora.vermesan)
Blocks: 696911
tracking-fennec: --- → ?
According to bug 696911, the expected behaviour is to hide the download notification if the download gets opened automatically, which should happen if:
- there is a  default application available to open the file downloaded
- fennec is in foreground when the download finishes.

Is this the case? Or the notification icon just disappear without handling the file?
If I go to:  
-http://goo.gl/wC8xy (a png file), long tap and save the image, the download complete notification doesn't appear. There is a not default application available to open the file downloaded.
-http://goo.gl/SRCLe (unsupported file), put Firefox in background, the download complete notification appears.( but in foreground no).
Is this the behaviour?
(In reply to Teodora Vermesan (:TeoVermesan) from comment #5)
> If I go to:  
> -http://goo.gl/wC8xy (a png file), long tap and save the image, the download
> complete notification doesn't appear. There is a not default application
> available to open the file downloaded.
> -http://goo.gl/SRCLe (unsupported file), put Firefox in background, the
> download complete notification appears.( but in foreground no).
> Is this the behaviour?

I guess it's not :(. The notification is supposed to disappear only if the file is automatically opened. I'll look into that (hopefully) this evening.
Federico, I'm assigning this to you, but let me know if you need help with it.
Assignee: nobody → fedepaol
Attached patch First versionSplinter Review
Teodora's test brought up another problem. There might be downloads whose mimeinfo is null. The case of the long tap over the image was one of them, so the condition for having a default handler becomes:
- mimeinfo not null
- # of handlers > 1
Attachment #762350 - Flags: feedback?
Attachment #762350 - Flags: feedback? → feedback?(margaret.leibovic)
Comment on attachment 762350 [details] [diff] [review]
First version

Review of attachment 762350 [details] [diff] [review]:
-----------------------------------------------------------------

So, this patch fixes the bug, but now I'm seeing the download notification even if the download opens automatically. Are you sure you need to check if possibleApplicationHandlers is > 1? Checking for > 0 doesn't work?

Maybe we should just land this and err on the side of showing notifications more often than not, since it's much more annoying to not have a notification show up than to have to dismiss one you didn't need. I feel like we're beginning to put way more energy into this issue than it deserves.

To clarify the bug reported in the description, is this problem just happening on builds that don't have a default handler? When I download an .apk file, it opens automatically, so no notification is expected. I agree that it's a problem that I'm not seeing a notification if an unsupported file (like a .dmg file).
Attachment #762350 - Flags: feedback?(margaret.leibovic) → feedback+
Attachment #762350 - Flags: review?(margaret.leibovic)
Comment on attachment 762350 [details] [diff] [review]
First version

As I said in my last comment, I think this is good enough to land. We should keep our eye out for complaints of any other disappearing notifications.
Attachment #762350 - Flags: review?(margaret.leibovic) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6f5a5f22d61d
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Verified fixed on:
Build: Firefox for Android 24.0a1(2013-06-20)
Device: Samsung Galaxy Nexus
OS: Android 4.1.1
Depends on: 887655
No longer depends on: 887655
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.