Fixed
Status Update
Comments
jo...@google.com <jo...@google.com> #2
Thank you for the detailed report.
li...@google.com <li...@google.com> #3
I found the issue. There is a bug where if you have nested screens pushed for result (as you do A pushing B and B pushing C), and you call finish inside of B's onScreenResultCallback, this causes the bug you see above.
We will be making a fix and rolling it out in an update of the library.
In the meantime, if you need to do this, you can get around the issue by calling ScreenManager#popTo(String) with a marker to Screen A.
jo...@google.com <jo...@google.com> #4
The fix will be in the Jetpack version of the library, in the meantime, please use the workaround described in #3.
sh...@google.com <sh...@google.com>
ag...@gmail.com <ag...@gmail.com> #5
Try reviewing the sequence in a group, from opening of an app Ascreen states ON_CREATE then ends in ON_RESUME.
Second group is (push b), Bscreen states ON_CREATE in first and close or ends states Bscreen ON_RESUME.
Third one states Cscreen in ON_CREATE also ends states with ON_RESUME.
So in (push c & b) states first at Bscreen in ON_CREATE, then it will states in ON_RESUME, even they are state in a middle part was ON_DESTROY, it will back in a ON_RESUME state at END of the bug.
Therefore, a rotation of sequence in a bug was sequentially.
Hope this help... 😇
Second group is (push b), Bscreen states ON_CREATE in first and close or ends states Bscreen ON_RESUME.
Third one states Cscreen in ON_CREATE also ends states with ON_RESUME.
So in (push c & b) states first at Bscreen in ON_CREATE, then it will states in ON_RESUME, even they are state in a middle part was ON_DESTROY, it will back in a ON_RESUME state at END of the bug.
Therefore, a rotation of sequence in a bug was sequentially.
Hope this help... 😇
Description
Situation
Let's say we have a screen stack of
[A, B, C]
.A
is the root, andC
is the top.B
is pushed byA
for some result viascreenManager.pushForResult()
. So isC
byB
.When
C
set the result andfinish()
itself,B
also set that result andfinish()
itself to relay the result toA
.Now we have
[A]
andA
is resumed properly.C
andB
is destroyed as well.Problem
B
's lifecycle is resumed again.Log