Closed Bug 786338 Opened 12 years ago Closed 12 years ago

NotificationHandler sending bad intents to gecko

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox16+ unaffected, firefox17+ fixed, firefox18 fixed)

RESOLVED FIXED
Tracking Status
firefox16 + unaffected
firefox17 + fixed
firefox18 --- fixed

People

(Reporter: wesj, Assigned: wesj)

References

Details

Attachments

(1 file)

Margaret has been seeing some strange behavior with notifications potentially. i.e. a "This url must be opened by an app Alert prompt appears" with nothing to do. I recently changed their behavior slightly in bug 781061. It sounds like we are trying to open the dat url sent to Fennec rather than The intent being sent to Fennec is what I expect:

I/GeckoNotificationHandler(25156): startActivity with intent: Action='org.mozilla.gecko.ACTION_ALERT_CALLBACK appName='org.mozilla.fennec.App'
I/ActivityManager(  308): START {act=org.mozilla.gecko.ACTION_ALERT_CALLBACK dat=alert:/-297100515?name=update-app&app=org.mozilla.fennec.App&cookie= flg=0x10000000 cmp=org.mozilla.fennec/.App u=0} from pid 25156

I'm guessing that we are trying to open this dat term when the Notification is tapped and Gecko isn't running. Will need to confirm that though.
Attached patch PatchSplinter Review
I hate having to do this this way. If Gecko is running and you tap a Notification, we end up calling onNewIntent which has all this code to do special things with different intents. If not (we used to just bail, but with my recent change we start Gecko now and) we call onCreate which just assumes any url's it finds in an intent are real urls.

I'd really like onCreate to call into the same code that onNewIntent does. Unfortunately, onNewIntent fires intents to start loads whereas onCreate just sends the url to gecko with startup params. i.e. untangling the two is not being easy. Since this is on beta right now, I'd like to put up this patch for there and work on a better one for Nightly?
Assignee: nobody → wjohnston
Attachment #656127 - Flags: review?(mark.finkle)
Attachment #656127 - Flags: review?(mark.finkle) → review+
Oh, I didn't see you file this. I filed bug 786394. Is that a dupe now?
Yeah. I'm still not sure what your webapp bug was though....
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Comment on attachment 656127 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 781061
User impact if declined: Clicking system Notifications after Fennec has closed will lead to strange messages and blank tabs. In webapps it can lead to unusable situations (i.e. a blank tab you can't get out of, but webapps are turned off on beta).
Testing completed (on m-c, etc.): Landed on mc 8-29
Risk to taking this patch (and alternatives if risky): This is the low risk alternative. We could change 781061 so that we don't launch fennec in these situations again, but that requires some Android trickery that is non-trivial on Aurora. We could revert 781061 entirely on Beta since webapps are disabled there.
String or UUID changes made by this patch: None.
Attachment #656127 - Flags: approval-mozilla-beta?
Attachment #656127 - Flags: approval-mozilla-aurora?
Attachment #656127 - Flags: approval-mozilla-beta?
Attachment #656127 - Flags: approval-mozilla-beta-
Attachment #656127 - Flags: approval-mozilla-aurora?
Attachment #656127 - Flags: approval-mozilla-aurora+
Let's track the backout of bug 781061 there.
Resolution: DUPLICATE → FIXED
Aurora checkin?
Did the patch land on Aurora 09/13?

I installed the Aurora build mentioned above, I checked for updates and I quit app after the notification was triggered. Clearing the notifications will auto-open Aurora.
I can reproduce this issue on the Aurora from 09/14. When notification update was triggered, I quit Aurora and then I cleared the update notification from Android Notification Bar. The result was auto-app relaunch. Reopening bug

--
Device: Galaxy Note
OS: Android 4.0.4
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ahh. The app relaunching is a different bug than the one fixed here (trying to open a bogus URL). The other piece was fixed in bug 786599, but not pushed to Aurora yet (doing that now). Thanks for catching that. Reclosing.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
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: