Fixed
Status Update
Comments
ro...@google.com <ro...@google.com>
sh...@google.com <sh...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 70aae171125c78d30f59e10be727c8ee3e345a64
Author: Billy Lam <shiufai@google.com>
Date: Tue Apr 13 08:49:46 2021
Make sure destroyed screens do not send more lifecycle events
Relnote: Fixed an exception that occurs when popping a Screen during start
Bug: 184664896
Test: ./gradlew :car:app:app:test
Change-Id: Ifcf409400e2af8e4aa7920b5fa469fc95ceb3322
M car/app/app/src/main/java/androidx/car/app/Screen.java
M car/app/app/src/test/java/androidx/car/app/ScreenTest.java
https://android-review.googlesource.com/1673541
Branch: androidx-main
commit 70aae171125c78d30f59e10be727c8ee3e345a64
Author: Billy Lam <shiufai@google.com>
Date: Tue Apr 13 08:49:46 2021
Make sure destroyed screens do not send more lifecycle events
Relnote: Fixed an exception that occurs when popping a Screen during start
Bug: 184664896
Test: ./gradlew :car:app:app:test
Change-Id: Ifcf409400e2af8e4aa7920b5fa469fc95ceb3322
M car/app/app/src/main/java/androidx/car/app/Screen.java
M car/app/app/src/test/java/androidx/car/app/ScreenTest.java
sh...@google.com <sh...@google.com> #3
This should be available in the next 1.0.0 release. Thanks for reporting the issue!
ji...@gmail.com <ji...@gmail.com> #4
I faced the same issue when I updated my navigation to 2.4.1
Description
Library version used: 1.0.0-rc01(same for beta01) Devices/Android versions reproduced on: Pixel 5/11 Android Auto version reproduced on: 6.1.610544-release
I have a Screen that observes a LiveData, and pops itself when some condition meets. The observer will run on start, so the screen will also be popped on start.
The above code works well. However, when I add a
LifecycleObserver
to the screen's lifecycle, the app crashes.Stack trace: