Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
Fixed internally and will be available in navigation 2.8.0-alpha02
.
gm...@gmail.com <gm...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit db700c8e99e354fbc35cf4bbd5f6f811deb587a0
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 31 16:19:02 2024
Fix NavGraph ViewModel destroyed too soon
The NavGraph entry when popped gets stored into savedState bundle but the entry's ViewModel is cleared from the ViewModelStore because we did not track the entry's saveState. We used to only track the saveState on FragmentNavigator and ComposeNavigator. Now whenever we pop, the base NavControllerNavigatorState would add the entry to map of saveState so we don't destroy the VM prematurely.
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 317581849
Change-Id: Ib6bb7d1d2f1af928a23a2647b1800eb4bb37d39d
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
https://android-review.googlesource.com/2942087
Branch: androidx-main
commit db700c8e99e354fbc35cf4bbd5f6f811deb587a0
Author: Clara Fok <clarafok@google.com>
Date: Wed Jan 31 16:19:02 2024
Fix NavGraph ViewModel destroyed too soon
The NavGraph entry when popped gets stored into savedState bundle but the entry's ViewModel is cleared from the ViewModelStore because we did not track the entry's saveState. We used to only track the saveState on FragmentNavigator and ComposeNavigator. Now whenever we pop, the base NavControllerNavigatorState would add the entry to map of saveState so we don't destroy the VM prematurely.
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 317581849
Change-Id: Ib6bb7d1d2f1af928a23a2647b1800eb4bb37d39d
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
yb...@google.com <yb...@google.com> #4
This is actually part of Navigation 2.8.0-alpha03
.
yb...@google.com <yb...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-runtime:2.8.0-alpha03
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 79deed62f2188a6ce2d21244dd28c3dc8ab6d0de
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 17 11:07:39 2018
Specify subscribeOn and unsubscribeOn scheduler in RxRoom.
Setting subscriber and unsubscriber schedulers prevents triggers being
synced in the main thread when subscribing or disposing a RxRoom
flowable / observable.
Moved beginTransaction() calls in InvalidationTracker outside the try,
finally with endTransaction() so that exceptions thrown by
beginTransaction() aren't aborted nor forgotten.
Bug: 117201279
Test: Manual test with sample app.
Change-Id: Iefb33dc63cf78e125a8805bd66a26ada365d8453
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/InvalidationTrackerTest.java
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
M room/rxjava2/src/main/java/androidx/room/RxRoom.java
M room/rxjava2/src/test/java/androidx/room/RxRoomTest.java
https://android-review.googlesource.com/792524
https://goto.google.com/android-sha1/79deed62f2188a6ce2d21244dd28c3dc8ab6d0de
Branch: androidx-master-dev
commit 79deed62f2188a6ce2d21244dd28c3dc8ab6d0de
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 17 11:07:39 2018
Specify subscribeOn and unsubscribeOn scheduler in RxRoom.
Setting subscriber and unsubscriber schedulers prevents triggers being
synced in the main thread when subscribing or disposing a RxRoom
flowable / observable.
Moved beginTransaction() calls in InvalidationTracker outside the try,
finally with endTransaction() so that exceptions thrown by
beginTransaction() aren't aborted nor forgotten.
Bug: 117201279
Test: Manual test with sample app.
Change-Id: Iefb33dc63cf78e125a8805bd66a26ada365d8453
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/InvalidationTrackerTest.java
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
M room/rxjava2/src/main/java/androidx/room/RxRoom.java
M room/rxjava2/src/test/java/androidx/room/RxRoomTest.java
da...@google.com <da...@google.com>
ph...@gmail.com <ph...@gmail.com> #8
Run
ph...@gmail.com <ph...@gmail.com> #9
Run
ph...@gmail.com <ph...@gmail.com> #10
Run
Description
Version used: 2.0.0
Devices/Android versions reproduced on:
Nexus 4 (Android 5.1.1)
Nexus 5 (Android 6.0.1)
Subscribing & unsubscribing causes StrictModeDiskReadViolation & StrictModeDiskWriteViolation.
This is very strange, given that "If you’re worried about threads, Room keeps you at ease and ensures that observable queries are done off the main thread." (from
Sample project attached.