Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "add dialog" crash #1004

Merged
merged 1 commit into from
Jun 22, 2020
Merged

Fix "add dialog" crash #1004

merged 1 commit into from
Jun 22, 2020

Conversation

di72nn
Copy link
Member

@di72nn di72nn commented Jun 22, 2020

Test scenario: Main screen -> Add new entry -> OK.

Fixes the crash that's been reported in the "pre-launch report" and in the console:

06-20 10:23:54.413: E/AndroidRuntime(30523): FATAL EXCEPTION: Thread-2553
06-20 10:23:54.413: E/AndroidRuntime(30523): Process: fr.gaulupeau.apps.InThePoche, PID: 30523
06-20 10:23:54.413: E/AndroidRuntime(30523): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
06-20 10:23:54.413: E/AndroidRuntime(30523): 	at android.app.ContextImpl.startActivity(ContextImpl.java:672)
06-20 10:23:54.413: E/AndroidRuntime(30523): 	at android.app.ContextImpl.startActivity(ContextImpl.java:659)
06-20 10:23:54.413: E/AndroidRuntime(30523): 	at fr.gaulupeau.apps.Poche.service.OperationsHelper.addArticleWithUI(OperationsHelper.java:39)
06-20 10:23:54.413: E/AndroidRuntime(30523): 	at fr.gaulupeau.apps.Poche.ui.MainActivity.lambda$showAddBagDialog$3$MainActivity(MainActivity.java:934)
06-20 10:23:54.413: E/AndroidRuntime(30523): 	at fr.gaulupeau.apps.Poche.ui.-$$Lambda$MainActivity$VI8v6PsPin0nTcg9cy19YmmIaEo.onClick(lambda)
06-20 10:23:54.413: E/AndroidRuntime(30523): 	at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
06-20 10:23:54.413: E/AndroidRuntime(30523): 	at android.os.Handler.dispatchMessage(Handler.java:102)

@tcitworld tcitworld merged commit 93aee15 into master Jun 22, 2020
@tcitworld tcitworld deleted the fix_add_dialog_crash branch June 22, 2020 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants