Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
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
https://android-review.googlesource.com/1360099
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
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit c089c772cb6332c8a8a1f685d3bcf235221176e9
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed May 19 23:54:34 2021
Expand Violation class to contain the Fragment
causing the Violation
Expanding the Violation class and those extending
from it to contain the Fragment that is causing
that Violation. This will be useful for better
error messaging.
RelNote: "The `Violation` class and those extending
from it now contain the `Fragment` that caused the
violation."
Bug: 187871150
Test: ./gradlew updateApi
Change-Id: If5118b1a169e4050620d4aac084d4692393e4e04
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentReuseViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/RetainInstanceUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetUserVisibleHintViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/TargetFragmentUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/Violation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/WrongFragmentContainerViolation.java
https://android-review.googlesource.com/1712557
Branch: androidx-main
commit c089c772cb6332c8a8a1f685d3bcf235221176e9
Author: Sanura N'Jaka <sanura@google.com>
Date: Wed May 19 23:54:34 2021
Expand Violation class to contain the Fragment
causing the Violation
Expanding the Violation class and those extending
from it to contain the Fragment that is causing
that Violation. This will be useful for better
error messaging.
RelNote: "The `Violation` class and those extending
from it now contain the `Fragment` that caused the
violation."
Bug: 187871150
Test: ./gradlew updateApi
Change-Id: If5118b1a169e4050620d4aac084d4692393e4e04
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentReuseViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/RetainInstanceUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetUserVisibleHintViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/TargetFragmentUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/Violation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/WrongFragmentContainerViolation.java
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 4b311dadfa55ac583c4a591633dc09f9c85926aa
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 00:26:17 2021
Expand FragmentTagUsageViolation to contain the
parent ViewGroup that the Fragment would have
been added to
Expanding FragmentTagUsageViolation to contain
the parent ViewGroup container that the Fragment
causing the violation would have been added to.
RelNote: "`FragmentTagUsageViolation` now contains
the parent ViewGroup container that the Fragment
causing the violation would have been added to."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I5dbbc3bc1e318dca326b2d58ad5e9b421e33b072
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
https://android-review.googlesource.com/1712486
Branch: androidx-main
commit 4b311dadfa55ac583c4a591633dc09f9c85926aa
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 00:26:17 2021
Expand FragmentTagUsageViolation to contain the
parent ViewGroup that the Fragment would have
been added to
Expanding FragmentTagUsageViolation to contain
the parent ViewGroup container that the Fragment
causing the violation would have been added to.
RelNote: "`FragmentTagUsageViolation` now contains
the parent ViewGroup container that the Fragment
causing the violation would have been added to."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I5dbbc3bc1e318dca326b2d58ad5e9b421e33b072
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 547d5a1f7ae587fb7a7548ca39b4708a28edb432
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 01:18:12 2021
Separate TargetFragmentUsageViolation into 3 subclasses
representing the three cases of the violation
Separating TargetFragmentUsageViolation into 3 subclasses,
SetTargetFragmentUsageViolation, GetTargetFragmentUsageViolation,
and GetTargetFragmentRequestCodeUsageViolation, representing
the three cases of the violation.
RelNote: "`TargetFragmentUsageViolation` is now abstract and
has 3 subclasses, `SetTargetFragmentUsageViolation`,
`GetTargetFragmentUsageViolation`, and
`GetTargetFragmentRequestCodeUsageViolation`, representing
the 3 cases that can cause the violation."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I741b4e0b8aff45babe1a453d41149c7972538789
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/GetTargetFragmentRequestCodeUsageViolation.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/GetTargetFragmentUsageViolation.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetTargetFragmentUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/TargetFragmentUsageViolation.java
https://android-review.googlesource.com/1713429
Branch: androidx-main
commit 547d5a1f7ae587fb7a7548ca39b4708a28edb432
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 01:18:12 2021
Separate TargetFragmentUsageViolation into 3 subclasses
representing the three cases of the violation
Separating TargetFragmentUsageViolation into 3 subclasses,
SetTargetFragmentUsageViolation, GetTargetFragmentUsageViolation,
and GetTargetFragmentRequestCodeUsageViolation, representing
the three cases of the violation.
RelNote: "`TargetFragmentUsageViolation` is now abstract and
has 3 subclasses, `SetTargetFragmentUsageViolation`,
`GetTargetFragmentUsageViolation`, and
`GetTargetFragmentRequestCodeUsageViolation`, representing
the 3 cases that can cause the violation."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I741b4e0b8aff45babe1a453d41149c7972538789
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/GetTargetFragmentRequestCodeUsageViolation.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/GetTargetFragmentUsageViolation.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetTargetFragmentUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/TargetFragmentUsageViolation.java
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 95b7424210db5f4e0d432d23c4d072b7b8022157
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 01:03:19 2021
Expand SetUserVisibleHintViolation to contain whether
the Fragment was being set isVisibleToUser or not
Expanding SetUserVisibleHintViolation to contain whether
the Fragment causing the violation was being set
isVisibleToUser or not.
RelNote: "`SetUserVisibleHintViolation` now contains
whether the `Fragment` causing the violation was being
set `isVisibleToUser` or not."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I0058552a0176f3e964ceda122b1eb2540490d1a5
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetUserVisibleHintViolation.java
https://android-review.googlesource.com/1713428
Branch: androidx-main
commit 95b7424210db5f4e0d432d23c4d072b7b8022157
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 01:03:19 2021
Expand SetUserVisibleHintViolation to contain whether
the Fragment was being set isVisibleToUser or not
Expanding SetUserVisibleHintViolation to contain whether
the Fragment causing the violation was being set
isVisibleToUser or not.
RelNote: "`SetUserVisibleHintViolation` now contains
whether the `Fragment` causing the violation was being
set `isVisibleToUser` or not."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I0058552a0176f3e964ceda122b1eb2540490d1a5
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetUserVisibleHintViolation.java
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 0ccc9e762bff9aaa2681c327d72dd96114853c20
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 00:49:23 2021
Separate RetainInstanceUsageViolation into
two subclasses distinguishes the two cases
Separating RetainInstanceUsageViolation into two
subclasses, SetRetainInstanceUsageViolation and
GetRetainInstanceUsageViolation, representing the
two cases for this violation type.
RelNote: "`RetainInstanceUsageViolation` is now
abstract and has two subclasses, `SetRetainInstanceUsageViolation`
and `GetRetainInstanceUsageViolation`, representing the two
cases for the violation type."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: Ic81e5ce6a552f47137cf9d101bc6ce81a3f61db3
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/GetRetainInstanceUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/RetainInstanceUsageViolation.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetRetainInstanceUsageViolation.java
https://android-review.googlesource.com/1712487
Branch: androidx-main
commit 0ccc9e762bff9aaa2681c327d72dd96114853c20
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 00:49:23 2021
Separate RetainInstanceUsageViolation into
two subclasses distinguishes the two cases
Separating RetainInstanceUsageViolation into two
subclasses, SetRetainInstanceUsageViolation and
GetRetainInstanceUsageViolation, representing the
two cases for this violation type.
RelNote: "`RetainInstanceUsageViolation` is now
abstract and has two subclasses, `SetRetainInstanceUsageViolation`
and `GetRetainInstanceUsageViolation`, representing the two
cases for the violation type."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: Ic81e5ce6a552f47137cf9d101bc6ce81a3f61db3
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/strictmode/FragmentStrictModeTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/GetRetainInstanceUsageViolation.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/RetainInstanceUsageViolation.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/SetRetainInstanceUsageViolation.java
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 260563499d2b7f8a5c9e0fd5d4b66eb9f1697609
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 01:27:28 2021
Expand WrongFragmentContainerViolation to contain
the ViewGroup container that the Fragment was trying
to be added to
Expanding WrongFragmentContainerViolation to contain
the ViewGroup container that the Fragment causing the
violation was trying to be added to. This will be
helpful in error messging.
RelNote: "`WrongFragmentContainerViolation` now contains
the `ViewGroup` container that the `Fragment` causing the
violation was trying to be added to."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I83c75a2b30f2defef7868e6d1b1d7ea63e576c57
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/WrongFragmentContainerViolation.java
https://android-review.googlesource.com/1713430
Branch: androidx-main
commit 260563499d2b7f8a5c9e0fd5d4b66eb9f1697609
Author: Sanura N'Jaka <sanura@google.com>
Date: Thu May 20 01:27:28 2021
Expand WrongFragmentContainerViolation to contain
the ViewGroup container that the Fragment was trying
to be added to
Expanding WrongFragmentContainerViolation to contain
the ViewGroup container that the Fragment causing the
violation was trying to be added to. This will be
helpful in error messging.
RelNote: "`WrongFragmentContainerViolation` now contains
the `ViewGroup` container that the `Fragment` causing the
violation was trying to be added to."
Bug: 187871150
Test: ./gradlew checkApi
Change-Id: I83c75a2b30f2defef7868e6d1b1d7ea63e576c57
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/WrongFragmentContainerViolation.java
jb...@google.com <jb...@google.com> #9
This has been fixed internally and will be available in the Fragment 1.4.0-alpha02
release.
Description
Component used: Fragment Version used: 1.4.0-alpha01
Each instance of
androidx.fragment.strictmode.Violation
tracks a specific type of StrictMode violation. Ideally, each subclass of Violation should have enough structured information (i.e., getters) to allow developers to verify exactly what caused the violation. This could include the Fragment instance itself or violation specific information. This would greatly improve the ability to have custom loggers extract this information and parse it in a useful way.The base
Violation
class should have agetFragment()
method that returns a NonNullFragment
instance that caused the Violation.Examples of information I'd expect to be available:
FragmentReuseViolation
:mRemoved
flag with amPreviousWho
nullable String).FragmentTagUsageViolation
:ViewGroup
that the Fragment would have been added to.RetainInstanceUsageViolation
:RetainInstanceUsageViolation
:SetRetainInstanceUsageViolation
andGetRetainInstanceUsageViolation
to allow distinguishing the two casesSetUserVisibleHintViolation
:boolean
indicating on whether the fragment was being setisVisibleToUser
or notTargetFragmentUsageViolation
TargetFragmentUsageViolation
:SetTargetFragmentUsageViolation
would include the targetFragment
instance and the intrequestCode
GetTargetFragmentUsageViolation
(no additional information)GetTargetFragmentRequestCodeUsageViolation
(no additional information)WrongFragmentContainerViolation
ViewGroup
container that the Fragment was trying to be added to