Closed
Bug 896992
Opened 11 years ago
Closed 11 years ago
Activity looping if GeckoApp has been killed and Settings is launched from notification
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox22 unaffected, firefox23- unaffected, firefox24+ verified, firefox25+ verified, fennec24+)
VERIFIED
FIXED
Firefox 25
Tracking | Status | |
---|---|---|
firefox22 | --- | unaffected |
firefox23 | - | unaffected |
firefox24 | + | verified |
firefox25 | + | verified |
fennec | 24+ | --- |
People
(Reporter: ioana.chiorean, Assigned: liuche)
References
Details
(Keywords: regression)
Attachments
(2 files, 5 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Build: Firefox 23.0b8 07/23
Device: LG Nexus 4, Galaxy Nexus (4.2.2)
Steps to reproduce:
1. Install app - Open it
2. Wait to get notification about data & stats
3. Swipe off Nightly to remove it from the foreground
4. Access data & stats from the notification shortcut
5. Press back (both from upper left corner or device's back)
Expected Results:
- You should be back in about:home
Actual Results:
- The page is very slow, tapping is almost not recognized etc
Note:
- See video here www.youtube.com/watch?v=KbpYke1vs1U
- Not reproducible on other devices that we have in the office
- You are not able to run the app until you clean data from Device's Settings.
Might be Regression from Bug 873072
Reporter | ||
Comment 1•11 years ago
|
||
> - You are not able to run the app until you clean data from Device's
> Settings.
And kill the app. Opening it from recently used apps will open the settings and you will find yourself in the same loop.
Reporter | ||
Comment 2•11 years ago
|
||
> Might be Regression from Bug 873072
Confirmed.
Patch from Bug 973072 c#8 produced this https://hg.mozilla.org/mozilla-central/rev/91cc9c75c3d1
Whiteboard: Regression
Updated•11 years ago
|
Updated•11 years ago
|
tracking-fennec: --- → ?
status-firefox22:
--- → unaffected
Keywords: regression
Whiteboard: Regression
Updated•11 years ago
|
Comment 3•11 years ago
|
||
we'll track a backout of bug 873072 for FF23 and hope for a forward fix in FF24 if possible, otherwise backout again.
status-firefox24:
--- → affected
status-firefox25:
--- → affected
tracking-firefox24:
--- → +
tracking-firefox25:
--- → +
Assignee | ||
Comment 4•11 years ago
|
||
I was only able to repro this on a Galaxy Nexus if I checked the developer option "Don't keep activities."
Is that setting selected on the phones you're using, Ioana?
If so, I think I can put together a quick fix for this. Since this is a notoriously problematic developer option that most users shouldn't even have turned on, I would really prefer to land and uplift a fix w/o backing out the original patch.
Lukas, I'll add the backout patch to bug 873072 but I'll also try to get a patch for the developer options case tonight.
Flags: needinfo?(ioana.chiorean)
Assignee | ||
Updated•11 years ago
|
Summary: Launching settings from Android system notification will keep the app in a loop → Activity looping if GeckoApp has been killed and Settings is launched from notification
Assignee | ||
Comment 5•11 years ago
|
||
This adds one line of handling if GeckoApp has been killed from under Settings.
Assignee: nobody → liuche
Status: NEW → ASSIGNED
Attachment #780811 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #780812 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #780812 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 8•11 years ago
|
||
Ioana: Please try out the build at http://people.mozilla.org/~liuche/bug-896992/
Let me know if you still see the problem on your devices.
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Chenxia Liu [:liuche] from comment #8)
> Ioana: Please try out the build at
> http://people.mozilla.org/~liuche/bug-896992/
The build works fine on both LG Nexus 4 and Galaxy Nexus (also in both case - with & without Keep activity checked in Developer options. )
Flags: needinfo?(ioana.chiorean)
Comment 10•11 years ago
|
||
Comment on attachment 780811 [details] [diff] [review]
Beta patch: handle restoring GeckoApp
Review of attachment 780811 [details] [diff] [review]:
-----------------------------------------------------------------
So if I'm understanding the code correctly, these checks will prevent the data notification settings pane from opening in some cases even when it should. I tried the following scenario with the APK you posted a couple of comments above:
1. Set "Don't keep activities" in the options
2. Start Fennec
3. Open the awesome bar (this will destroy GeckoApp)
4. Close the awesome bar (this will open GeckoApp with mIsRestoringActivity true)
5. Open the data notification from the android notification bar
These steps will run through the "onNewIntent" codepath while mIsRestoringActivity is set to true, and so the data notification thing won't open when in fact it should. Here's another scenario:
1. Set "Don't keep activities" in the options
2. Start Fennec
3. Put Fennec in the background (GeckoApp will be killed)
4. Open the data notification from the android notification bar
This will run through the initialize() code path with mIsRestoringActivity set to true, and so will not open the data notification pane.
I'm not entirely sure what caused the original problem - is that when Android re-creates the GeckoApp activity, it re-delivers the intent to it? If so, maybe a better solution is to either null out the intent in GeckoApp or if that doesn't work, add a flag on the intent saying that it has been processed and check that instead of mIsRestoringActivity.
::: mobile/android/base/GeckoApp.java
@@ +1973,5 @@
> String uri = getURIFromIntent(intent);
> GeckoAppShell.sendEventToGecko(GeckoEvent.createURILoadEvent(uri));
> } else if (ACTION_ALERT_CALLBACK.equals(action)) {
> processAlertCallback(intent);
> + } if (ACTION_LAUNCH_SETTINGS.equals(action) && !mIsRestoringActivity) {
Also: This is missing an "else" between the } and the "if"
Attachment #780811 -
Flags: review?(bugmail.mozilla) → review-
Assignee | ||
Comment 11•11 years ago
|
||
This sets a flag to note when saving state that we have already launched settings and should clear that action.
The apk is the beta2.apk at http://people.mozilla.com/~liuche/bug-896992/
Attachment #780811 -
Attachment is obsolete: true
Attachment #780812 -
Attachment is obsolete: true
Attachment #780815 -
Attachment is obsolete: true
Attachment #781060 -
Flags: review?(bugmail.mozilla)
Comment 12•11 years ago
|
||
Comment on attachment 781060 [details] [diff] [review]
Patch: Beta patch: handle settings intent with flag v2
Review of attachment 781060 [details] [diff] [review]:
-----------------------------------------------------------------
This looks ok to me. That being said I would advise against uplifting this to beta this late in the cycle unless you're sure you've tested every possible scenario. Patches that touch our startup codepath have a history of breaking things subtly because our startup is pretty brittle. Sometimes even adding innocuous lines of code causes a previously latent race condition to trigger.
Attachment #781060 -
Flags: review?(bugmail.mozilla) → review+
Comment 13•11 years ago
|
||
Triage agrees with Kats. Let's only uplift this to Fx24.
tracking-fennec: ? → 24+
Assignee | ||
Comment 14•11 years ago
|
||
This patch fixes the looping by adding flag to be tracked until GeckoApp is properly destroyed, but there seems to be some padding issue with the recreated GeckoApp, where the urlbar overlaps the content.
Attachment #781060 -
Attachment is obsolete: true
Assignee | ||
Comment 15•11 years ago
|
||
Lukas, should I remove tracking for 23 since we decided we're not going to uplift to beta at this late in the stage, and is there anything else I need to do since 23 is going to ship with this bug?
Flags: needinfo?(lsblakk)
Assignee | ||
Updated•11 years ago
|
Attachment #781377 -
Attachment description: Patch: m-c WIP - fixes looping → Patch: fix looping with flag
Attachment #781377 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Leaving this tracked for FF24 in order to get a forward fix that doesn't bring back bug 873072
Comment 18•11 years ago
|
||
Comment on attachment 781377 [details] [diff] [review]
Patch: fix looping with flag
Review of attachment 781377 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM. Some nits below but I don't feel strongly about them.
::: mobile/android/base/GeckoApp.java
@@ +135,5 @@
> public static final String ACTION_BOOKMARK = "org.mozilla.gecko.BOOKMARK";
> public static final String ACTION_LOAD = "org.mozilla.gecko.LOAD";
> public static final String ACTION_LAUNCH_SETTINGS = "org.mozilla.gecko.SETTINGS";
> public static final String ACTION_INIT_PW = "org.mozilla.gecko.INIT_PW";
> + public static final String SAVED_STATE_ACTION_MAIN = "setActionMain";
nit: I would rename this SAVED_STATE_INTENT_HANDLED for consistency with the boolean variable. Change the value likewise.
@@ +160,5 @@
> private static GeckoThread sGeckoThread;
> private GeckoProfile mProfile;
> public static int mOrientation;
> protected boolean mIsRestoringActivity;
> + private boolean mIntentHandled = false;
No need to initialize this; boolean fields are initialized to false by default.
@@ +637,5 @@
>
> outState.putBoolean(SAVED_STATE_IN_BACKGROUND, isApplicationInBackground());
> outState.putString(SAVED_STATE_PRIVATE_SESSION, mPrivateBrowsingSession);
> +
> + // Bug 896992 - Replace intent action with ACTION_MAIN on restart.
nit: trailing whitespace
Attachment #781377 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 19•11 years ago
|
||
Attachment #781377 -
Attachment is obsolete: true
Assignee | ||
Comment 20•11 years ago
|
||
[Approval Request Comment]
Bug caused by (feature/regressing bug #): 873072
User impact if declined: Devices with low memory or "Don't keep activities" dev option turned on will be looped infinitely to the settings screen if they tap on the datareporting notification if Fennec has been killed
Testing completed (on m-c, etc.): Manually tested, try build: https://tbpl.mozilla.org/?tree=Try&rev=9194ed28deaf
Risk to taking this patch (and alternatives if risky): low risk, adding a single flag to startup code to be tracked between restarts
String or IDL/UUID changes made by this patch: none
Attachment #783242 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 21•11 years ago
|
||
Landed on inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/dd1908156c2f
Comment 22•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Updated•11 years ago
|
Attachment #783242 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 23•11 years ago
|
||
Landed in Aurora: https://hg.mozilla.org/releases/mozilla-aurora/rev/f06b3090f197
Assignee | ||
Updated•11 years ago
|
Target Milestone: Firefox 25 → Firefox 24
Comment 24•11 years ago
|
||
Target milestone tracks m-c landing. Tracking flags track branch uplifts.
Target Milestone: Firefox 24 → Firefox 25
Updated•11 years ago
|
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
•