Loading core/api/current.txt +3 −2 Original line number Diff line number Diff line Loading @@ -4157,7 +4157,7 @@ package android.app { method protected void onActivityResult(int, int, android.content.Intent); method @Deprecated public void onAttachFragment(android.app.Fragment); method public void onAttachedToWindow(); method public void onBackPressed(); method @Deprecated public void onBackPressed(); method protected void onChildTitleChanged(android.app.Activity, CharSequence); method public void onConfigurationChanged(@NonNull android.content.res.Configuration); method public void onContentChanged(); Loading Loading @@ -5049,7 +5049,7 @@ package android.app { method @CallSuper public void onActionModeFinished(android.view.ActionMode); method @CallSuper public void onActionModeStarted(android.view.ActionMode); method public void onAttachedToWindow(); method public void onBackPressed(); method @Deprecated public void onBackPressed(); method public void onContentChanged(); method public boolean onContextItemSelected(@NonNull android.view.MenuItem); method public void onContextMenuClosed(@NonNull android.view.Menu); Loading Loading @@ -32947,6 +32947,7 @@ package android.preference { method @Deprecated public boolean isMultiPane(); method @Deprecated protected boolean isValidFragment(String); method @Deprecated public void loadHeadersFromResource(@XmlRes int, java.util.List<android.preference.PreferenceActivity.Header>); method @Deprecated public void onBackPressed(); method @Deprecated public void onBuildHeaders(java.util.List<android.preference.PreferenceActivity.Header>); method @Deprecated public android.content.Intent onBuildStartFragmentIntent(String, android.os.Bundle, @StringRes int, int); method @Deprecated public android.preference.PreferenceActivity.Header onGetInitialHeader(); core/java/android/app/Activity.java +4 −0 Original line number Diff line number Diff line Loading @@ -3938,7 +3938,11 @@ public class Activity extends ContextThemeWrapper * </ul> * * @see #moveTaskToBack(boolean) * * @deprecated Use {@link OnBackInvokedCallback} or * {@code androidx.activity.OnBackPressedCallback} to handle back navigation instead. */ @Deprecated public void onBackPressed() { if (mActionBar != null && mActionBar.collapseActionView()) { return; Loading core/java/android/app/Dialog.java +4 −0 Original line number Diff line number Diff line Loading @@ -726,7 +726,11 @@ public class Dialog implements DialogInterface, Window.Callback, * Called when the dialog has detected the user's press of the back * key. The default implementation simply cancels the dialog (only if * it is cancelable), but you can override this to do whatever you want. * * @deprecated Use {@link OnBackInvokedCallback} or * {@code androidx.activity.OnBackPressedCallback} to handle back navigation instead. */ @Deprecated public void onBackPressed() { if (mCancelable) { cancel(); Loading Loading
core/api/current.txt +3 −2 Original line number Diff line number Diff line Loading @@ -4157,7 +4157,7 @@ package android.app { method protected void onActivityResult(int, int, android.content.Intent); method @Deprecated public void onAttachFragment(android.app.Fragment); method public void onAttachedToWindow(); method public void onBackPressed(); method @Deprecated public void onBackPressed(); method protected void onChildTitleChanged(android.app.Activity, CharSequence); method public void onConfigurationChanged(@NonNull android.content.res.Configuration); method public void onContentChanged(); Loading Loading @@ -5049,7 +5049,7 @@ package android.app { method @CallSuper public void onActionModeFinished(android.view.ActionMode); method @CallSuper public void onActionModeStarted(android.view.ActionMode); method public void onAttachedToWindow(); method public void onBackPressed(); method @Deprecated public void onBackPressed(); method public void onContentChanged(); method public boolean onContextItemSelected(@NonNull android.view.MenuItem); method public void onContextMenuClosed(@NonNull android.view.Menu); Loading Loading @@ -32947,6 +32947,7 @@ package android.preference { method @Deprecated public boolean isMultiPane(); method @Deprecated protected boolean isValidFragment(String); method @Deprecated public void loadHeadersFromResource(@XmlRes int, java.util.List<android.preference.PreferenceActivity.Header>); method @Deprecated public void onBackPressed(); method @Deprecated public void onBuildHeaders(java.util.List<android.preference.PreferenceActivity.Header>); method @Deprecated public android.content.Intent onBuildStartFragmentIntent(String, android.os.Bundle, @StringRes int, int); method @Deprecated public android.preference.PreferenceActivity.Header onGetInitialHeader();
core/java/android/app/Activity.java +4 −0 Original line number Diff line number Diff line Loading @@ -3938,7 +3938,11 @@ public class Activity extends ContextThemeWrapper * </ul> * * @see #moveTaskToBack(boolean) * * @deprecated Use {@link OnBackInvokedCallback} or * {@code androidx.activity.OnBackPressedCallback} to handle back navigation instead. */ @Deprecated public void onBackPressed() { if (mActionBar != null && mActionBar.collapseActionView()) { return; Loading
core/java/android/app/Dialog.java +4 −0 Original line number Diff line number Diff line Loading @@ -726,7 +726,11 @@ public class Dialog implements DialogInterface, Window.Callback, * Called when the dialog has detected the user's press of the back * key. The default implementation simply cancels the dialog (only if * it is cancelable), but you can override this to do whatever you want. * * @deprecated Use {@link OnBackInvokedCallback} or * {@code androidx.activity.OnBackPressedCallback} to handle back navigation instead. */ @Deprecated public void onBackPressed() { if (mCancelable) { cancel(); Loading