Assigned
Status Update
Comments
vi...@google.com <vi...@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
vi...@google.com <vi...@google.com> #3
Please provide the information as requested in comment #2 , for us to further investigate this issue.
da...@gmail.com <da...@gmail.com> #4
The androidx FragmentActivity docs are here: https://developer.android.com/reference/androidx/fragment/app/FragmentActivity .
And the androidx AppCompatActivity docs are here:https://developer.android.com/reference/androidx/appcompat/app/AppCompatActivity
The methods with misleading javadocs are:
onActivityResult
onCreate
onDestroy
onPause
onPostResume
onResume
onSaveInstanceState
onStart
onStop
Expected output:
I would expect these methods' javadocs to include the same content as the javadocs for their overridden methods in Activity.
Current output:
The javadocs look like they are instructing the user to call these methods to do things like manually destroying or pausing all fragments.
I stumbled on this because I was trying the view the javadocs in Android Studio to refresh myself on a detail of the Activity lifecycle. I do this by using the Alt-middle-click shortcut on a method in my code.
Screen record: N/A
And the androidx AppCompatActivity docs are here:
The methods with misleading javadocs are:
onActivityResult
onCreate
onDestroy
onPause
onPostResume
onResume
onSaveInstanceState
onStart
onStop
Expected output:
I would expect these methods' javadocs to include the same content as the javadocs for their overridden methods in Activity.
Current output:
The javadocs look like they are instructing the user to call these methods to do things like manually destroying or pausing all fragments.
I stumbled on this because I was trying the view the javadocs in Android Studio to refresh myself on a detail of the Activity lifecycle. I do this by using the Alt-middle-click shortcut on a method in my code.
Screen record: N/A
vi...@google.com <vi...@google.com> #5
We have passed this defect onto the development team and will update this issue with more information as it becomes available.
bn...@google.com <bn...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 65cabf4fb58e34a38216c4bb64eb75dd6d501cb7
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Feb 25 15:21:28 2021
Add @inheritDoc to override methods in FragmentActivity
Any overriden method that adds javaDoc to the new method should make the
call to @inheritDoc to ensure the previous javaDoc is also shown.
RelNote: "Overriden methods in FragmentActivity now properly inherit the
base method javaDoc"
Test: existing tests pass
Bug: 139548782
Change-Id: I736ce6ad3c248c093ccb4cdf1f40029451fd1422
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
https://android-review.googlesource.com/1607248
Branch: androidx-main
commit 65cabf4fb58e34a38216c4bb64eb75dd6d501cb7
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Feb 25 15:21:28 2021
Add @inheritDoc to override methods in FragmentActivity
Any overriden method that adds javaDoc to the new method should make the
call to @inheritDoc to ensure the previous javaDoc is also shown.
RelNote: "Overriden methods in FragmentActivity now properly inherit the
base method javaDoc"
Test: existing tests pass
Bug: 139548782
Change-Id: I736ce6ad3c248c093ccb4cdf1f40029451fd1422
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
Description