Closed Bug 1236049 Opened 5 years ago Closed 5 years ago

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)

Categories

(Firefox for Android :: General, defect)

45 Branch
All
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 46
Tracking Status
firefox45 --- fixed
firefox46 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

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

Missed a spot in the fix for bug 1224295.
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+
https://hg.mozilla.org/mozilla-central/rev/a0e7d1e3945e
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Jim, this is present in 45, please uplift.
Flags: needinfo?(nchen)
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+
Version: unspecified → 45 Branch
You need to log in before you can comment on or make changes to this bug.