Fixed
Status Update
Comments
il...@google.com <il...@google.com>
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
mh...@google.com <mh...@google.com> #3
Not all of our builds depend on androidx.fragment and if you do not use androidx.fragment and you add this disable flag, lint fails due to non-existant check DialogFragmentCallbacksDetector. If you do not plan on fixing this soon, I can try and see if we can only disable the check if we depend on androidx.fragment.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 52b166175eabed99d14515190bfa0a7cea787004
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon May 10 16:11:44 2021
Fix OnCreateDialogIncorrectCallback lint on empty java classes
The OnCreateDialogIncorrectCallbackDetector lint rule currently checks
the first element of a list without verifying the item is actually
there. We should check if the item is null before we do anything else.
RelNote: "The `OnCreateDialogIncorrectCallbackDetector` no longer fails
on empty java classes/interfaces"
Test: java empty interface clean
Bug: 187524311
Change-Id: Iaff6c041370bd5a7c2ac8ef8c32a2e6f7a15e456
M fragment/fragment-lint/src/main/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetector.kt
M fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
https://android-review.googlesource.com/1702325
Branch: androidx-main
commit 52b166175eabed99d14515190bfa0a7cea787004
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon May 10 16:11:44 2021
Fix OnCreateDialogIncorrectCallback lint on empty java classes
The OnCreateDialogIncorrectCallbackDetector lint rule currently checks
the first element of a list without verifying the item is actually
there. We should check if the item is null before we do anything else.
RelNote: "The `OnCreateDialogIncorrectCallbackDetector` no longer fails
on empty java classes/interfaces"
Test: java empty interface clean
Bug: 187524311
Change-Id: Iaff6c041370bd5a7c2ac8ef8c32a2e6f7a15e456
M fragment/fragment-lint/src/main/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetector.kt
M fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
jb...@google.com <jb...@google.com> #5
This has been fixed internally and will be available in the Fragment 1.4.0-alpha01
release.
jo...@gmail.com <jo...@gmail.com> #6
I am using 1.4.0-alpha01 of the Fragment Library but I am still getting this error.
il...@google.com <il...@google.com> #7
Re #6 - please file a new bug with a sample that reproduces your error.
de...@gmail.com <de...@gmail.com> #8
Comment has been deleted.
de...@gmail.com <de...@gmail.com> #9
Still getting this annoying lint error. For some reason this probably happens after updating to AGP 7.4.0-alpha03. The error is pointing to DaggerApplication which is even more confusing
Description
Component used: Fragment Version used: (latest 1.4.0-SNAPSHOT) Devices/Android versions reproduced on: N/A (host lint crash)
A new lint check was added to androidx.fragment ( DialogFragmentCallbacksDetector ) which is crashing lint when run. It looks like it crashes if a javafile has a class/interface with no supertype?
Here is an abridged stacktrace: