Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 7b17505c2e3679330cf386efe69f1aa95b6ae9e9
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Jan 06 14:47:42 2022
Update safeArgs to AGP 7.0.4
Updating safeArgs to depend on AGP 7.0.4.
Removing the use of reflection from the plugin since we no longer
needed.
RelNote: "Safe Args now depends on Android Gradle Plugin version 7.0.4.
This means that Navigation Safe Args will no longer be compatible with
Android Studio versions prior to 7.0."
Test: ./gradlew --rerun-tasks navigation:navigation-safe-args-gradle-plugin:test
Bug: 213086135
Bug: 207670704
Change-Id: I41c88ee06ad827c61cb1bbdc5ba58b3d56155caf
M navigation/navigation-safe-args-gradle-plugin/build.gradle
M navigation/navigation-safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/SafeArgsPlugin.kt
https://android-review.googlesource.com/1940534
Branch: androidx-main
commit 7b17505c2e3679330cf386efe69f1aa95b6ae9e9
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Jan 06 14:47:42 2022
Update safeArgs to AGP 7.0.4
Updating safeArgs to depend on AGP 7.0.4.
Removing the use of reflection from the plugin since we no longer
needed.
RelNote: "Safe Args now depends on Android Gradle Plugin version 7.0.4.
This means that Navigation Safe Args will no longer be compatible with
Android Studio versions prior to 7.0."
Test: ./gradlew --rerun-tasks navigation:navigation-safe-args-gradle-plugin:test
Bug: 213086135
Bug: 207670704
Change-Id: I41c88ee06ad827c61cb1bbdc5ba58b3d56155caf
M navigation/navigation-safe-args-gradle-plugin/build.gradle
M navigation/navigation-safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/SafeArgsPlugin.kt
Description
Component used: Fragment
Version used: 1.2.0-rc04
Devices/Android versions reproduced on: all
If you commit a reordered postponed transaction, followed by a non-reordered transaction (postponed or not), the non-reordered transaction can be executed before the postponed one. That means that transactions will be executed out of order and the final state of the app will be incorrect. This happens because non-reordered transactions completely ignore postponed transactions and are executed indiscriminately.
The attached sample commits two FragmentTransactions in the onCreate of the activity..
The first is a replace of with postponed fragment with a postponed timeout of 4 seconds that is reordered and the second is a replace with non-postponed fragment that is not reordered.
The postponed fragment has a purple background while the non-postponed fragment has a blue background.
Expected behavior:
The app is launched.
The reordered-postponed transaction is committed, then the non-reordered transaction is committed.
The postponed transaction is forced to execute immediately before the non-reordered transaction is executed.
The final state of the app is the non-postponed fragment with the blue background.
Observed behavior:
The app is launched.
The reordered-postponed transaction is committed, then the non-reordered transaction is committed.
The non-reordered transaction is executed immediately, but does not force the postponed transaction.
The blue background appears.
Once the postponed timeout finishes, the postponed transaction is executed.
The final state of the app is the postponed fragment with the purple background.