Closed
Bug 932816
Opened 11 years ago
Closed 11 years ago
Unable to close the app if webrtc is being used
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox25 unaffected, firefox26 unaffected, firefox27+ verified, firefox28 verified, fennec27+)
VERIFIED
FIXED
Firefox 28
Tracking | Status | |
---|---|---|
firefox25 | --- | unaffected |
firefox26 | --- | unaffected |
firefox27 | + | verified |
firefox28 | --- | verified |
fennec | 27+ | --- |
People
(Reporter: AdrianT, Assigned: wesj)
References
()
Details
(Keywords: regression, reproducible)
Attachments
(2 files, 3 obsolete files)
7.49 KB,
patch
|
fedepaol
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
6.00 KB,
patch
|
fedepaol
:
review+
|
Details | Diff | Splinter Review |
Aurora 27.0a2 2013-09-29/ Nightly 28.0a1 2013-09-30
Samsung Galaxy Tab 2 (Android 4.1)/ LG Nexus 4 (Android 4.2.2)
Steps to reproduce:
1) Load http://mozilla.github.com/webrtc-landing/gum_test.html and share camera and microphone
2) Minimize the app and close it from the Android app manager
3) Open the app again
Expected results:
The app is closed and when it is reopened loads about:home
Actual results:
The app never closes and it's just maximized. The notification of camera and microphone in use is never removed
Comment 1•11 years ago
|
||
This is reproducible and is also a leaking the camera again. After attempting to swipe off the browser, my console floods with:
V/WEBRTC-JC(17889): preview frame length 518400 context-2029162496
V/SecCameraCoreManager( 246): __data_cb
tracking-firefox27:
--- → ?
Keywords: regressionwindow-wanted,
reproducible
Comment 2•11 years ago
|
||
Gian-Carlo - can you look at this?
blassey: doesn't killing from the app manager actually kill? Is it merely a "please-shut-down" request? Even if it's just a request, we should exit. Do we still have a Quit command hidden anywhere we could try while in a gum test?
Flags: needinfo?(gpascutto)
Flags: needinfo?(blassey.bugs)
Reporter | ||
Comment 3•11 years ago
|
||
Closing the app by force killing it or using the "Quit" add-on releases the camera and microphone and correctly closes the app
Comment 4•11 years ago
|
||
I noticed in 25, swiping off the browser will remove will the 'Camera is on' notification, in 26 and 27, swiping the browser off will retain the 'Camera is on' notification.
Comment 5•11 years ago
|
||
>close it from the Android app manager
What does this mean exactly?
Flags: needinfo?(gpascutto)
Comment 6•11 years ago
|
||
Comment #4, meant 28 and 27. 26 and 25 are unaffected as far as I can tell (I am merely activating the camera on the basic gUM test and then swiping the application off the recent list). In 27 and 28, the notification persists while in 25 and 26, the notification is cleared.
status-firefox26:
--- → unaffected
Comment 7•11 years ago
|
||
FWIW the icon also changed from a camera to a Fennec icon at some point, which also seems undesirable to me.
Comment 8•11 years ago
|
||
(In reply to Gian-Carlo Pascutto (:gcp) from comment #7)
> FWIW the icon also changed from a camera to a Fennec icon at some point,
> which also seems undesirable to me.
Filed bug 933275
Comment 9•11 years ago
|
||
The first bad revision is:
changeset: 148539:3181933b1780
user: Federico Paolinelli <fedepaol@gmail.com>
date: Tue Sep 24 13:53:55 2013 -0700
summary: Bug 815202 - Add Pause and Cancel actions to download notifications. r=wesj
Comment 10•11 years ago
|
||
It looks like that changeset effectively backed out Bug 882136?!
Updated•11 years ago
|
Keywords: regressionwindow-wanted
Updated•11 years ago
|
Updated•11 years ago
|
Assignee: gpascutto → wjohnston
Updated•11 years ago
|
Keywords: regressionwindow-wanted
Assignee | ||
Comment 11•11 years ago
|
||
I yanked this because it didn't fix the real problem before. Didn't realize it was still helpful :)
Attachment #825733 -
Flags: review?(fedepaol)
Attachment #825733 -
Flags: review?(bnicholson)
Updated•11 years ago
|
Flags: needinfo?(blassey.bugs)
Comment 12•11 years ago
|
||
Comment on attachment 825733 [details] [diff] [review]
Patch
Review of attachment 825733 [details] [diff] [review]:
-----------------------------------------------------------------
Yeah, the flow here was really confusing -- short summary back in https://bugzilla.mozilla.org/show_bug.cgi?id=885783#c22. The way things are now, WebRTC notifications act the same as download notifications (which I was actually pushing for in that comment), but they probably shouldn't be as persistent.
Attachment #825733 -
Flags: review?(bnicholson) → review+
Assignee | ||
Comment 13•11 years ago
|
||
Shoot. We need to be careful here then. Downloads are also going through this flow now.
Maybe we need to not do this for progress notifications... Or maybe we're better with just a separate flag.
Comment 14•11 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #13)
> Shoot. We need to be careful here then. Downloads are also going through
> this flow now.
Good point, though this actually may not be a bad thing if it works correctly. The whole reason we added this foreground notification logic to downloads was because we couldn't think of a way to clean up notifications during a kill, and they would get permanently stuck after Fennec died (especially bad for private browsing). Even though it's kind of a hack, we have a way to do that now, so maybe cancelling in-progress downloads and allowing the browser to close is what we want?
On the other hand, this won't work very well with "Don't keep activities" since Gecko stays alive and the download continues, even if we remove the notifications. This is one of the reasons we could really use a native download service -- it would eliminate all of these issues by killing the Gecko-download dependency.
Question about your patch: will clearAll remove only in-progress notifications, or will it also clear finished ones? I think we want to remove only the former, so if clearAll actually clears all, we'll probably need a different fix.
Assignee | ||
Comment 15•11 years ago
|
||
clearAll removes anything, including "ongoing" ones like the webrtc notifications or downloads.
Updated•11 years ago
|
Comment 16•11 years ago
|
||
Comment on attachment 825733 [details] [diff] [review]
Patch
Review of attachment 825733 [details] [diff] [review]:
-----------------------------------------------------------------
The patch looks good. However, as you and bnicholson discussed in the previous comments, if we add this, we will fix the webrtc bug but we will also change the current behaviour for download notifications.
I would say that what we could do is to add a "never close me" flag to download notifications to re-enable the previous behaviour (downloads will go through this new flow, their notifications won't be killed as before), and then try to fix the well known issues related to ongoing downloads in another bug. Exploiting the side effect we are introducing here feels a bit too hacky.
This is enforced by about what Bryan says about "Don't keep activities". If I understood correctly (which might be far from the case), when the activity gets destroyed, the onDestroy method is called, all the notifications are removed and then the NotificationService calls stopForeground. In any case, that would not result in an immediate shutdown of the service, which might be kept around for a while (and gecko and its downloads with it)
Comment 17•11 years ago
|
||
Attachment #825733 -
Attachment is obsolete: true
Attachment #825733 -
Flags: review?(fedepaol)
Attachment #827035 -
Flags: review?(wjohnston)
Comment 18•11 years ago
|
||
Just noticed that I left a "FEDE" trace in the previous patch.
Anyway, this one adds a "persistent" flag that avoids download notification to be wiped out when clearAll() is called
Attachment #827035 -
Attachment is obsolete: true
Attachment #827035 -
Flags: review?(wjohnston)
Attachment #827038 -
Flags: review?
Updated•11 years ago
|
Attachment #827038 -
Flags: review? → review?(wjohnston)
Assignee | ||
Comment 19•11 years ago
|
||
Comment on attachment 827038 [details] [diff] [review]
bug-932816-fix
Review of attachment 827038 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/NotificationHelper.java
@@ +287,5 @@
> +
> + boolean persistent = message.optBoolean(PERSISTENT_ATTR);
> + // We add only not persistent notifications to the list since we want to purge only
> + // them when geckoapp is destroyed.
> + if (!persistent && !mShowing.contains(id)) {
Lets add a comment up by mShowing as well, that says that it only contains notifications we want to purge when GeckoApp is destroyed (i.e. non-persistent ones).
Attachment #827038 -
Flags: review?(wjohnston) → review+
Comment 20•11 years ago
|
||
Renamed mShowing to mClearableNotifications
Attachment #827038 -
Attachment is obsolete: true
Attachment #827633 -
Flags: review+
Assignee | ||
Comment 21•11 years ago
|
||
Comment 22•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Comment 24•11 years ago
|
||
Someone please nominate this for uplift
Flags: needinfo?(wjohnston)
Flags: needinfo?(fedepaol)
Assignee | ||
Comment 25•11 years ago
|
||
Comment on attachment 827633 [details] [diff] [review]
bug-932816-fix
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 815202
User impact if declined: Have to stop webrtc to kill fennec
Testing completed (on m-c, etc.): landed on mc this week. Tested by QA
Risk to taking this patch (and alternatives if risky): Pretty low risk. Putting back some deleted code. A bit tricky because we also had to support the current path for downloads (Fennec can't be killed while downloads are in progress)
String or IDL/UUID changes made by this patch: None
Attachment #827633 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
Attachment #827633 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 26•11 years ago
|
||
Aurora doesn't have Notifications.jsm. This will need a branch-specific patch for uplift.
Flags: needinfo?(wjohnston)
Keywords: branch-patch-needed
Updated•11 years ago
|
Flags: needinfo?(fedepaol) → needinfo?(wjohnston)
Assignee | ||
Comment 27•11 years ago
|
||
Updated for Aurora. Seemed pretty straight forward. Still building to test though :)
Attachment #833016 -
Flags: review?(fedepaol)
Flags: needinfo?(wjohnston)
Updated•11 years ago
|
Keywords: branch-patch-needed
Comment 28•11 years ago
|
||
Comment on attachment 833016 [details] [diff] [review]
Aurora Patch
Looks good.
Attachment #833016 -
Flags: review?(fedepaol) → review+
Comment 29•11 years ago
|
||
Comment 30•11 years ago
|
||
Verified fixed on:
Build: Firefox for Android 27 Beta 1 (2013-12-11)
Device: LG Nexus 4
OS: Android 4.2.2
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
•