Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Is this fixed? I'm still seeing this issue with AGP 8.1.0-beta01 + Gradle 8.1
ap...@google.com <ap...@google.com> #3
The fix has not been landed.
jb...@google.com <jb...@google.com> #4
Due to this bug in CI we hit configuration cache invalidation 100% of the time. Can we make sure the fix lands soon? And especially before 8.1.0 stable.
Description
Component used: Activity
Version used: 1.7.2
As explained in the Predictive Back guide , you shouldn't use an
OnBackPressedCallback
for non-UI cases (for example, just for logging back). If you add a callback, you have to handle back completely in your callback.That means that calling
remove()
and triggering back viarequireActivity.onBackPressed()
oronBackPressedDispatcher.onBackPressed()
is always an anti-pattern and something that you should not do.It would be helpful if there was a Lint error that specifically catch this case and warn developers ahead of time that this is the wrong thing to do and offer alternatives or at least link to the guide for more information.