Page MenuHomeGitPull.it

Fix crash: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag on version 1.15.3
Closed, ResolvedPublic

Description

Dear Developers,
Please triage this crash:

version code:
34

version name:
1.15.3

android version:
9

phone:
SM-S367VL

brand:
samsung

stack:
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:974)
	at android.app.ContextImpl.startActivity(ContextImpl.java:950)
	at android.content.ContextWrapper.startActivity(ContextWrapper.java:384)
	at it.reyboz.bustorino.backend.utils.openIceweasel(utils.java:124)
	at it.reyboz.bustorino.ActivityPrincipal$ToolbarItemClickListener.onMenuItemClick(ActivityPrincipal.java:554)
	at androidx.appcompat.widget.Toolbar$1.onMenuItemClick(Toolbar.java:207)
	at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:779)
	at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:834)
	at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:985)
	at androidx.appcompat.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
	at android.widget.AdapterView.performItemClick(AdapterView.java:362)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1689)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:4130)
	at android.widget.AbsListView.onTouchUp(AbsListView.java:6627)
	at android.widget.AbsListView.onTouchEvent(AbsListView.java:6373)
	at android.widget.ListView.onTouchEvent(ListView.java:1705)
	at androidx.appcompat.widget.DropDownListView.onTouchEvent(DropDownListView.java:217)
	at androidx.appcompat.widget.MenuPopupWindow$MenuDropDownListView.onTouchEvent(MenuPopupWindow.java:138)
	at android.view.View.dispatchTouchEvent(View.java:13473)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3216)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2888)
	at android.widget.AbsListView.dispatchTouchEvent(AbsListView.java:6285)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3222)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2904)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3222)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2904)
	at android.widget.PopupWindow$PopupDecorView.dispatchTouchEvent(PopupWindow.java:2700)
	at android.view.View.dispatchPointerEvent(View.java:13721)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6200)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5978)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5427)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5480)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5446)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5605)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5454)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5662)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5427)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5480)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5446)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5454)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5427)
	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8504)
	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8424)
	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8377)
	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8619)
	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:198)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:326)
	at android.os.Looper.loop(Looper.java:181)
	at android.app.ActivityThread.main(ActivityThread.java:7156)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

Thank you! :) By J. Harmon.

Generated with https://lab.reyboz.it/libre-busto/crash-report/ (P15)

Event Timeline

valerio.bozzolan renamed this task from Fix crash: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag to Fix crash: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag on version 1.15.3.Jul 20 2021, 10:03
fabio.mazza claimed this task.
fabio.mazza subscribed.

Fixed by linked differential