Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 57ca221882695bd6a52549f4d9ea3b812e6fe87c
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Mon Mar 22 16:09:30 2021
[GH] [FragmentStrictMode] Detect <fragment> tag usage
## Proposed Changes
- Detect `<fragment>` tag usage inside XML layouts
## Testing
Test: See `FragmentStrictModeTest#detectFragmentTagUsage`
## Issues Fixed
Fixes: 153738235
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/141 .
Resolves #141
Github-Pr-Head-Sha: 4ea052596e4341b9f11bcf335e2bc38045a91f19
GitOrigin-RevId: 62e7487aa4874eef6bb556490e193717cf937251
Change-Id: Iae48578e85e4e4897f806d7ade2e2a660adf9479
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/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
https://android-review.googlesource.com/1649748
Branch: androidx-main
commit 57ca221882695bd6a52549f4d9ea3b812e6fe87c
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Mon Mar 22 16:09:30 2021
[GH] [FragmentStrictMode] Detect <fragment> tag usage
## Proposed Changes
- Detect `<fragment>` tag usage inside XML layouts
## Testing
Test: See `FragmentStrictModeTest#detectFragmentTagUsage`
## Issues Fixed
Fixes: 153738235
This is an imported pull request from
Resolves #141
Github-Pr-Head-Sha: 4ea052596e4341b9f11bcf335e2bc38045a91f19
GitOrigin-RevId: 62e7487aa4874eef6bb556490e193717cf937251
Change-Id: Iae48578e85e4e4897f806d7ade2e2a660adf9479
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/FragmentLayoutInflaterFactory.java
M fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentStrictMode.java
A fragment/fragment/src/main/java/androidx/fragment/app/strictmode/FragmentTagUsageViolation.java
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 6dc219c28bb2c64f5a517b64f3592c85d7bf5127
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Mar 03 10:57:00 2021
Fix fragment-ktx kdocs
Since Fragment `1.3.0-alpha05` to clear a FragmentResult or
FragmentResultListener, you should use the respective "clear" methods.
The documentation for the parameters of set methods should be updated
since they no longer use null to clear.
RelNote: "The Kdocs for setFragmentResult and setFragmentResultListener
have updated their parameters docs to reflect that they no longer accept
nullables"
Test: ./gradlew bOS
Bug: 178348386
Change-Id: I990baa2e1b71a11b11342c366c284903c247e631
M fragment/fragment-ktx/src/main/java/androidx/fragment/app/Fragment.kt
https://android-review.googlesource.com/1615442
Branch: androidx-main
commit 6dc219c28bb2c64f5a517b64f3592c85d7bf5127
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Mar 03 10:57:00 2021
Fix fragment-ktx kdocs
Since Fragment `1.3.0-alpha05` to clear a FragmentResult or
FragmentResultListener, you should use the respective "clear" methods.
The documentation for the parameters of set methods should be updated
since they no longer use null to clear.
RelNote: "The Kdocs for setFragmentResult and setFragmentResultListener
have updated their parameters docs to reflect that they no longer accept
nullables"
Test: ./gradlew bOS
Bug: 178348386
Change-Id: I990baa2e1b71a11b11342c366c284903c247e631
M fragment/fragment-ktx/src/main/java/androidx/fragment/app/Fragment.kt
jb...@google.com <jb...@google.com> #4
This has been fixed internally and will be available in the Fragment 1.3.1
and 1.4.0-alpha01
releases.
Description
1.3.0-rc01
The documentation of
Fragment.setFragmentResult
extension function offragment-ktx
is wrong about nullability ofresult
.@param result the result to be passed to another fragment or
nullif you want to clear out any pending result.
result
is annotated@NonNull
onFragmentManager
Java API and the Kotlin type ofresult
isBundle
, notBundle?
.How can we "clear out any pending result" then?
Related to this, how should we communicate "cancel" or "no result" with this API? An empty bundle?