Fixed
Status Update
Comments
jb...@google.com <jb...@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
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 4b8e7bb8638fcf2f22f74ff3ef94811d90c3c3e3
Author: Sanura N'Jaka <sanura@google.com>
Date: Tue Aug 30 19:52:18 2022
Have DialogFragment always dismiss
Using the onDismissListener to ensure that
DialogFragment always dismisses the dialog
regardless of whether super.onDismiss()
is called when overriden.
RelNote: "`DialogFragment` will now always
dismiss the dialog whenever `dismiss()`
(or `dismissNow()`) is called, regardless
of whether `super.onDismiss()` is called
when overriden."
Test: DialogFragmentTest.testDismissDialogFragmentNoSuperCall
Bug: 238928865
Change-Id: Ifc93bcf45a8fbae382c98b3c489b7ed64f5c4d8e
M fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentTest.kt
https://android-review.googlesource.com/2199784
Branch: androidx-main
commit 4b8e7bb8638fcf2f22f74ff3ef94811d90c3c3e3
Author: Sanura N'Jaka <sanura@google.com>
Date: Tue Aug 30 19:52:18 2022
Have DialogFragment always dismiss
Using the onDismissListener to ensure that
DialogFragment always dismisses the dialog
regardless of whether super.onDismiss()
is called when overriden.
RelNote: "`DialogFragment` will now always
dismiss the dialog whenever `dismiss()`
(or `dismissNow()`) is called, regardless
of whether `super.onDismiss()` is called
when overriden."
Test: DialogFragmentTest.testDismissDialogFragmentNoSuperCall
Bug: 238928865
Change-Id: Ifc93bcf45a8fbae382c98b3c489b7ed64f5c4d8e
M fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
M fragment/fragment/src/androidTest/java/androidx/fragment/app/DialogFragmentTest.kt
il...@google.com <il...@google.com> #4
This has been fixed internally (it is no longer necessary to call super.onDismiss(Dialog)
at all - that work now happens immediately before the call to onDismiss()
) and will be available in Fragment 1.6.0-alpha03.
jb...@google.com <jb...@google.com>
jb...@google.com <jb...@google.com> #5
We ran into a situation where this changed behavior could cause some issues. So we will just be adding the @CallSuper
annotation instead.
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 3fbc5d7acb68e581f167460c11ee68474776981d
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Sep 08 12:18:34 2022
Add a @CallSuper to DialogFragment onDismiss
Inorder to ensure that classes extending DialogFragment get the proper
dismiss behavior, they should always call super in their onDismiss
overrides.
RelNote: "Classes extending `DialogFragment` will now be required to
call super in their `onDismiss()` overrides."
Test: this adds an annotation that is verified via lint & ./gradlew
checkApi
Bug: 238928865
Change-Id: I147983f443693b1cafbd996cbbacd726e2dd2130
M fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
https://android-review.googlesource.com/2211716
Branch: androidx-main
commit 3fbc5d7acb68e581f167460c11ee68474776981d
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Sep 08 12:18:34 2022
Add a @CallSuper to DialogFragment onDismiss
Inorder to ensure that classes extending DialogFragment get the proper
dismiss behavior, they should always call super in their onDismiss
overrides.
RelNote: "Classes extending `DialogFragment` will now be required to
call super in their `onDismiss()` overrides."
Test: this adds an annotation that is verified via lint & ./gradlew
checkApi
Bug: 238928865
Change-Id: I147983f443693b1cafbd996cbbacd726e2dd2130
M fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
M fragment/fragment/api/restricted_current.txt
M fragment/fragment/api/current.txt
M fragment/fragment/api/public_plus_experimental_current.txt
jb...@google.com <jb...@google.com> #7
This has been fixed internally (again) and will be available in Fragment 1.6.0-alpha03
.
na...@google.com <na...@google.com> #8
Comment has been deleted.
na...@google.com <na...@google.com> #9
This bug was linked in a change in the following release(s):
androidx.fragment:fragment:1.6.0-alpha03
Description
Whenever overriding
DialogFragment
'sonDismiss()
oronCancel()
functions, developers should also call super to ensure that they still execute the functionality of theDialogFragment
in their custom component.