Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
Version used: alpha 0.0.5
Devices/Android versions reproduced on: Android 8.1 Oneplus 3T, Android 6.0 Moto G Turbo edition
I made a sample project which consists of a main activity and 2 fragments, FragmentA and FragmentB
Fragment A has a button to fragment B
Fragment B simply states that you are on fragment B
The main activity listens for and logs which page you are on when you navigate
The main activity has 4 buttons
1 - Pop - Calls navigation controllers popBackStack() method
1 - Pop to root - Calls navigation controllers popBackStack() method with fragment A as a destination and inclusive set to false, so you get back to the top of the stack
3 - Up - calls navigation controllers navigateUp method
4 - Check page, gives a toast with the current destinations label
The bugs:
1) If you press pop when on the home screen, you end up still on the home screen but the navigation controller seems to forget where it is. The current destination becomes null but im still on page a. I can still go to page b too. But once on page b, all further navigation fails. Not sure if this is a bug or intentional
2) To get around this i used pop to root instead. This one works fine most the time but if you hit the button for going to fragment b and simultaneously hit the pop to root button, sometimes, if you time it right, it breaks the backstack. The current destination button tells me I'm on A, the backstack size (checked via debugger) also suggests I'm on A, and therefore pop and pop to root both stop working (since it thinks I'm already at the top). Yet I see B on my screen. Checking the navigation listener, it thinks im on A too (that's the last thing logged). I'm assuming some sort of race condition or something is causing this.
When the backstack is broken in either of these 2 ways, i can still use the up button, but it causes the activity to recreate (judging by the code, i think it thinks I'm deep linked into fragment B)
Also when it is broken via
The sample project is attached.