Fixed
Status Update
Comments
sh...@google.com <sh...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 0ceecba883de1438896a21bd94193ad925b1ba76
Author: repo sync -c -j8 <shiufai@google.com>
Date: Mon Mar 29 15:38:46 2021
Ensure Session's lifecycle observer can be added first before Screens.
Bug: 183696617
Relnote: Fixes an issue where `ON_DESTORY` on a `Session` is observed after a `Screen`'s `ON_DESTROY`
Test: ./gradlew :car:app:app:test
Change-Id: I52e01fe22e4e6dc8130735ebae49a1575928ee5a
M car/app/app/src/main/java/androidx/car/app/CarAppService.java
M car/app/app/src/main/java/androidx/car/app/Session.java
M car/app/app/src/test/java/androidx/car/app/CarAppServiceTest.java
https://android-review.googlesource.com/1656245
Branch: androidx-main
commit 0ceecba883de1438896a21bd94193ad925b1ba76
Author: repo sync -c -j8 <shiufai@google.com>
Date: Mon Mar 29 15:38:46 2021
Ensure Session's lifecycle observer can be added first before Screens.
Bug: 183696617
Relnote: Fixes an issue where `ON_DESTORY` on a `Session` is observed after a `Screen`'s `ON_DESTROY`
Test: ./gradlew :car:app:app:test
Change-Id: I52e01fe22e4e6dc8130735ebae49a1575928ee5a
M car/app/app/src/main/java/androidx/car/app/CarAppService.java
M car/app/app/src/main/java/androidx/car/app/Session.java
M car/app/app/src/test/java/androidx/car/app/CarAppServiceTest.java
sh...@google.com <sh...@google.com> #3
This should be fixed for the next 1.0.0 release. Thanks for reporting the issue!
pa...@tomtom.com <pa...@tomtom.com> #4
So when we can expect this promised 1.0.0 release :)? it's been almost month since 1.0.0-rc01. And this is serious issue with lifecycle of library building blocks that would be nice to fix before we gonna send our app to production.
Description
Library version used: 1.0.0-rc01 Devices/Android versions reproduced on: Any Android Auto version reproduced on: 6.1.610544-release
androidx.car.app.Session vs androidx.car.app.Screen
When app starts and screens are created I can see that session (
androidx.car.app.Session
) always getsonCreate
oronStart
calls before the screen (androidx.car.app.Screen
) does which is correct. Unfortunatelly, when app shuts down, normally the order should be reversed so I'd expect:Unfortunatelly the order goes like:
Session should be destroyed after the screen gets destroyed, not before. This is causing some nasty shutdown issues in our app.