crash in android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? at android.app.ContextImpl.startActivity(ContextImpl.java)

RESOLVED FIXED in Firefox 45

Status

()

--
critical
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: jchen, Assigned: jchen)

Tracking

({crash, regression})

45 Branch
Firefox 46
All
Android
crash, regression
Points:
---

Firefox Tracking Flags

(firefox45 fixed, firefox46 fixed)

Details

(crash signature)

Attachments

(1 attachment)

+++ This bug was initially created as a clone of Bug #1224295 +++

Missed a spot in the fix for bug 1224295.
Created attachment 8703172 [details] [diff] [review]
Be smarter about which Context to use for opening Intent (v1)

Use an Activity as the Context when we have one. This avoids the crash
and also avoids an ugly black flash when you cancel the intent chooser.
When we don't have an activity, use an application context and add the
new task flag.
Attachment #8703172 - Flags: review?(s.kaspari)
Attachment #8703172 - Flags: review?(s.kaspari) → review+

Comment 3

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a0e7d1e3945e
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Jim, this is present in 45, please uplift.
Flags: needinfo?(nchen)
status-firefox45: --- → affected
Flags: needinfo?(nchen)
Comment on attachment 8703172 [details] [diff] [review]
Be smarter about which Context to use for opening Intent (v1)

Approval Request Comment
[Feature/regressing bug #]: Bug 1219016
[User impact if declined]: Possible crash when opening external URL.
[Describe test coverage new/current, TreeHerder]: Locally, m-c, aurora
[Risks and why]: Very small; patch has been on m-c for a while.
[String/UUID change made/needed]: None
Attachment #8703172 - Flags: approval-mozilla-beta?
Blocks: 1224295
No longer blocks: 1219016
No longer depends on: 1224295
Comment on attachment 8703172 [details] [diff] [review]
Be smarter about which Context to use for opening Intent (v1)

Fix a crash, taking it.
Should be in 45 beta 2.
Attachment #8703172 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment 7

3 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/bcdcf7bb2b96
status-firefox45: affected → fixed
Version: unspecified → 45 Branch
You need to log in before you can comment on or make changes to this bug.