Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
It has to be overridden to ensure that the
But we should mark it as deprecated so that developers building on top of ComponentActivity don't override it and instead move their logic to those APIs for handling back.
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 9307154b17ee735c581b627f27401de2b1928149
Author: sanura <sanura@google.com>
Date: Wed Mar 08 18:37:13 2023
Deprecate ComponentActivity.onBackPressed()
ComponentActivity.onBackPressed() should be
deprecate so that developers building on top
of ComponentActivity don't override it and
instead use OnBackPressedDispatcher.
RelNote: "`ComponentActivity.onBackPressed()`
has now been deprecated in favor of the APIs
for handling back. Developers should now
utilize the `OnBackPressedDispatcher`, rather
than overriding this method."
Fixes: 271596918
Test: ./gradlew bOS
Change-Id: Ibce2f664a8d73cb1df06c20918752fb3dfb44e0c
A activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_current.txt
A activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
https://android-review.googlesource.com/2472947
Branch: androidx-main
commit 9307154b17ee735c581b627f27401de2b1928149
Author: sanura <sanura@google.com>
Date: Wed Mar 08 18:37:13 2023
Deprecate ComponentActivity.onBackPressed()
ComponentActivity.onBackPressed() should be
deprecate so that developers building on top
of ComponentActivity don't override it and
instead use OnBackPressedDispatcher.
RelNote: "`ComponentActivity.onBackPressed()`
has now been deprecated in favor of the APIs
for handling back. Developers should now
utilize the `OnBackPressedDispatcher`, rather
than overriding this method."
Fixes: 271596918
Test: ./gradlew bOS
Change-Id: Ibce2f664a8d73cb1df06c20918752fb3dfb44e0c
A activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_current.txt
A activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
Description
[1]:
[2]: