Fixed
Status Update
Comments
al...@google.com <al...@google.com> #2
It could easy to reproduce when turning on "Don't keep activities".
il...@google.com <il...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ba0c19707915ff87d9cac2089fcd166bb5cca17d
Author: Ian Lake <ilake@google.com>
Date: Wed Nov 14 16:20:28 2018
Set the correct FragmentManager on active Fragments
All active Fragments should have the correct
FragmentManager set instead of always using the
Activity's FragmentManager.
While added Fragments have their FragmentManager
set correctly in moveToState(), active Fragments
weren't being set correctly, causing issues when
attempting to save the state of the FragmentManager.
Test: new FragmentLifecycleTest
BUG: 119256498
Change-Id: I830f729d93f00859509a0844fae19752342e6ccc
M fragment/src/androidTest/java/androidx/fragment/app/FragmentLifecycleTest.java
M fragment/src/main/java/androidx/fragment/app/FragmentManagerImpl.java
M fragment/src/main/java/androidx/fragment/app/FragmentState.java
https://android-review.googlesource.com/826954
https://goto.google.com/android-sha1/ba0c19707915ff87d9cac2089fcd166bb5cca17d
Branch: androidx-master-dev
commit ba0c19707915ff87d9cac2089fcd166bb5cca17d
Author: Ian Lake <ilake@google.com>
Date: Wed Nov 14 16:20:28 2018
Set the correct FragmentManager on active Fragments
All active Fragments should have the correct
FragmentManager set instead of always using the
Activity's FragmentManager.
While added Fragments have their FragmentManager
set correctly in moveToState(), active Fragments
weren't being set correctly, causing issues when
attempting to save the state of the FragmentManager.
Test: new FragmentLifecycleTest
BUG: 119256498
Change-Id: I830f729d93f00859509a0844fae19752342e6ccc
M fragment/src/androidTest/java/androidx/fragment/app/FragmentLifecycleTest.java
M fragment/src/main/java/androidx/fragment/app/FragmentManagerImpl.java
M fragment/src/main/java/androidx/fragment/app/FragmentState.java
dz...@gmail.com <dz...@gmail.com> #4
Thanks Ian! Looking forward to a new alpha release ASAP rather than monthly release.😅
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #5
Thanks for fixing this!
Description
Version used: 1.3.0-beta01
Devices/Android versions reproduced on:
OnePlus 8 (API30), OnePlus 2 (API23), Emulator (API30)
Repository:
Steps to reproduce: Select input field -> Click button to navigate to new fragment (via Navigation library) -> Check notification for LeakCanary message (After returning back via back button all objects are garbage collected, but if you close app via home button you will receive warning from LeakCanary).
Additional info: It seems like there is no such problem in alpha02 version