Status Update
Comments
jb...@google.com <jb...@google.com>
jb...@google.com <jb...@google.com>
tp...@gmail.com <tp...@gmail.com> #2
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
jb...@google.com <jb...@google.com> #3
Can you provide a sample for that case as well so we can ensure any fix we have addresses that as well?
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit 7b70603d0d18f00187898b5397d9b6ba90500032
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon Apr 24 18:37:09 2023
Dispatch onBackStackChange callbacks to the correct records
With reorderingAllowed true, it is possible to get in a scenario where
there are multiple transactions in the FragmentManager, some added to
the back stack and others not. FragmentManager currently looks at the
global result and if a single transaction changes the back stack it
dispatches onBackStackChange callbacks for all of the records.
We need to ensure only the individual records that explicitly add things
to the back stack cause the onBackStackChange callbacks to be
dispatched.
RelNote: "Fixed an issue where the onBackStackChangeListener callbacks
were being dispatched for transactions that did not actually change the
back stack if they were mixed in with transactions that do."
Test: Added onBackStackChangedListenerTest
Bug: 279306628
Change-Id: I0eb5c9622f2984232ac106bb975ba72ae9b2435f
M fragment/fragment/src/androidTest/java/androidx/fragment/app/OnBackStackChangedListenerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
jb...@google.com <jb...@google.com> #5
This has been fixed internally and will be available in the Fragment 1.6.0-rc01
release.
jb...@google.com <jb...@google.com> #6
You can try running your code with a snapshot build from
tp...@gmail.com <tp...@gmail.com> #7
Hi, I have created a sample and attached in this separate issue here as this issue is marked as fixed. Crash still occurs with the latest snapshot build from androidx.dev
ma...@gmail.com <ma...@gmail.com> #8
Tested for 2.6.0-SNAPSHOT, (Build 10012776)
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.fragment:fragment:1.6.0-rc01
za...@google.com <za...@google.com> #10
Still hitting this: YAQS/8332979824100376576
ma...@zentity.com <ma...@zentity.com> #11
Still persist in 2.6.0. From Crashlytics report:
Fatal Exception: java.lang.IllegalArgumentException: The fragment MyFragment{e08e9e3} (ffd3a63d-e7c5-4d27-8836-9579f2aea852 id=0x7f0a03a2 tag=0dcc6840-37be-40d3-9aab-10a5381ca884) is unknown to the FragmentNavigator. Please use the navigate() function to add fragments to the FragmentNavigator managed FragmentManager.
at androidx.navigation.fragment.FragmentNavigator$onAttach$2.onBackStackChangeCommitted(FragmentNavigator.kt:143)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1918)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1845)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1782)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:565)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7879)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009)
MyFragment is in main fragment for subgraph which is included to nav_graph.xml.
an...@gmail.com <an...@gmail.com> #12
Same case as above so I assume that not further details are required.
All good if I test with version 2.6.0-alpha09.
I assume the problem starts here:
I do add fragments navigate() and there are no manual FragmentTransaction's in the project.
jb...@google.com <jb...@google.com> #13
Please file a new bug with a minimal sample project that reproduces this issue.
go...@gmail.com <go...@gmail.com> #14
I have a BottomNavigationView and I just quickly click on two elements asynchronously and within 1 minute it crashes
You probably have test projects, two fragments will be enough
jb...@google.com <jb...@google.com> #15
We will need you to file a new bug with a minimal sample project that reproduces this issue.
Description
Version used: 2.6.0-beta01
Devices/Android versions reproduced on: Everywhere
Crash stack trace
java.lang.IllegalArgumentException: The fragment BottomSheetFragment{6c59aad}
(a05692b2-965c-40c6-82ce-57991ab0e8d6 tag=b3f6ebd6-263b-402f-8ebe-7762287c5f6d) is unknown to the FragmentNavigator. Please use the navigate() function to add fragments to the FragmentNavigator managed FragmentManager. (FragmentNavigator.kt:147)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1918)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1845)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1782)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:565)
You can reproduce crash in the attached project.
Project has 3 fragments.
1. StartFragment
2. BottomSheetDialog
3. SimpleFragment
Navigation flow looks like: StartFragment (click on button) -> Navigation opens BottomSheet dialog fragment (click on button) -> crash.
But in 2.6.0-alpha09 and below crash is not reproduced and all works fine (BottomSheet dialog disappears and SimpleFragment appears, back stack looks like StartFragment -> SimpleFragment)
Thanks.