Closed Bug 921776 Opened 11 years ago Closed 11 years ago

Notifications aren't properly dismissed when multiple downloads are started from private tabs

Categories

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

All
Android
defect
Not set
normal

Tracking

(firefox25 ?, firefox26 fixed, firefox27 verified, firefox28 verified, b2g-v1.2 fixed)

VERIFIED FIXED
Firefox 27
Tracking Status
firefox25 --- ?
firefox26 --- fixed
firefox27 --- verified
firefox28 --- verified
b2g-v1.2 --- fixed

People

(Reporter: rnewman, Assigned: fedepaol)

References

Details

Attachments

(2 files, 1 obsolete file)

Bug report from SUMO:

"when a download is started from a private tab the notification is automatically dismissed upon completion. if multiple downloads are active this goes wrong. the notification for the completed download will show the status and filename of the ongoing download, while the notification originally belonging to the ongoing download will keep displaying the % the ongoing download had when the other download finished. "

https://support.mozilla.org/en-US/questions/972655
Attached patch bug-921776-fix (obsolete) — Splinter Review
In short: the notifications were switching one over the other. Setting the "when" parameter fixed the behaviour. While fixing this one, I found another bug which prevented the remanining notification to be set as the new foreground one.
Attachment #814559 - Flags: review?(wjohnston)
Comment on attachment 814559 [details] [diff] [review]
bug-921776-fix

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

::: mobile/android/base/NotificationService.java
@@ +9,5 @@
>  import android.app.Service;
>  import android.content.Intent;
>  import android.os.Binder;
>  import android.os.IBinder;
> +import android.util.Log;

Don't need this
Attachment #814559 - Flags: review?(wjohnston) → review+
Attached patch bug-921776-fixSplinter Review
That was easy. 
I take the liberty to mark this as review+ since I am confident I did not break anything removing that import :)
Attachment #814559 - Attachment is obsolete: true
Attachment #816373 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/76251cfbba5b
Assignee: nobody → fedepaol
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
I'm on Nightly (10/15, https://hg.mozilla.org/mozilla-central/rev/febfe3c7732b) and am still seeing the behaviour described in comment #0 – on download completion, the notification is automatically dismissed. The same task performed in regular tabs will persist the notification.

On 10/15 Nightly: new private tab, http://nightly.mozilla.org, tap the Android APK download button
Status: RESOLVED → REOPENED
Flags: needinfo?(fedepaol)
Resolution: FIXED → ---
:-( 
Will check as soon as I get home
Flags: needinfo?(fedepaol)
Ok, I see what's going on. 
I focused on the fact that multiple downloads were overlapping not noticing the notification disappeared part. Patch coming soon for this other issue.
Sorry about this!
Attached patch bug-921776-fix2Splinter Review
This should (eventually ?) fix the download complete notification not showing for private downloads.
Attachment #817378 - Flags: review?(wjohnston)
Attachment #817378 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/0792108113b0
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Depends on: 933775
I think 26 is affected here, what's the risk towards uplifting?
Flags: needinfo?(wjohnston)
Flags: needinfo?(fedepaol)
There were two different issues (and patches) here. The first one was about having multiple notifications overlapping, and it was strictly related to the new downloads / notificatoins restyling. This should not affect 26.

The other one was private downloads notifications not dismissed when started from private tabs, and this is the one 26 is affected. The patch that solves this is https://bugzilla.mozilla.org/attachment.cgi?id=817378, and I think the risks in uplifting it are pretty low.
Flags: needinfo?(fedepaol)
Comment on attachment 817378 [details] [diff] [review]
bug-921776-fix2

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 815202
User impact if declined: Private download notifications hide as soon as the download finishes
Testing completed (on m-c, etc.):  been on mc for a month
Risk to taking this patch (and alternatives if risky): Low risk. Just fixing some js namespcae problems.
String or IDL/UUID changes made by this patch: none
Attachment #817378 - Flags: approval-mozilla-beta?
Attachment #817378 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Keywords: verifyme
Tested with Galaxy Nexus (4.3) using:
Firefox 26 Beta 8 
Firefox 27.0a2
Firefox 28.0a1

Steps:
1. Load a page (ex: mozilla.org)
2. Save page as pdf.
3. Load another page (ex. webmaker.org)
4. Save page as pdf
5. Check notifications

All download s notifications are well adjust (name, progress) to the correct download.
But:
- Doing twice Save as pdf for osut.org - reproduces the behavior from Comment 0.

Should I close this and open new one with more investigations on that page?
Yes, although from your comment it's unclear if this is working. Is this bug fixed?
Device: LG Nexus 4 (Android 4.2.2)
Builds: Firefox for Android 28.0a1 (2013-12-01) and Firefox for Android 27.0a2 (2013-12-01)
When you perform a download in private tab, the download complete  notification remains in the notification bar.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Verified fixed on:
Device: Samsung Galaxy Nexus (Android 4.2.1)
Build: Firefox for Android 27.0a2 (2013-12-06)
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: