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(android): crash on changing activity context after animated navigation Fixes #5674 #5700

Merged
merged 3 commits into from
Apr 20, 2018

Conversation

manoldonev
Copy link
Contributor

Fixes #5674

Fixes Android Lollipop (API Level 21 and 22) crash on changing activity context (e.g. starting external activity with utils.openurl(...) call or minimizing app) after navigation with animated transition has been executed within the app.

@manoldonev manoldonev added this to the 4.1 milestone Apr 18, 2018
@manoldonev manoldonev self-assigned this Apr 18, 2018
@ghost ghost added the in progress label Apr 18, 2018
if (this._currentEntry && this._currentEntry.fragment) {
const manager: android.app.FragmentManager = this._getFragmentManager();
const transaction = manager.beginTransaction();
private disposeCurrentFragment(): void {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the disposeCurrentFragment() call because of this: [quoting @MartoYankov] in Tabs-Frames-Pages scenario all of the frames' fragments are restored before the tabs' fragments are recreated and they try to load their pages before they have been selected. The chosen solution was to remove the frame fragment on unloading the frame. We want Android to recreate the tab fragment that will load its frame (that creates a new fragment for the page).

@manoldonev manoldonev merged commit 4f5887b into master Apr 20, 2018
@ghost ghost removed the in progress label Apr 20, 2018
@manoldonev manoldonev deleted the mdonev/lollipop-fragment-transition-fix branch April 20, 2018 10:46
@manoldonev manoldonev restored the mdonev/lollipop-fragment-transition-fix branch April 20, 2018 10:53
@manoldonev manoldonev deleted the mdonev/lollipop-fragment-transition-fix branch April 20, 2018 10:53
@manoldonev manoldonev restored the mdonev/lollipop-fragment-transition-fix branch April 20, 2018 10:54
@manoldonev
Copy link
Contributor Author

tests for api level 21 & 22 executed here: #5712

@manoldonev manoldonev deleted the mdonev/lollipop-fragment-transition-fix branch April 20, 2018 13:42
@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using animated transition during navigation on Android 21 and 22
4 participants