diff options
| author | 2024-01-12 00:23:14 +0000 | |
|---|---|---|
| committer | 2024-01-12 01:56:21 +0000 | |
| commit | de48acfda6a83e639dffe29fd96b8b8a4657e41f (patch) | |
| tree | 293df6a5b2361619d8ca2e00763d8e0ab0cf78b3 | |
| parent | a8a2013b89b79e9e9252adfdd53538f392164fcb (diff) | |
Revert "Deprecate Activity#isChild/getParent"
This reverts commit a8a2013b89b79e9e9252adfdd53538f392164fcb.
Reason for revert: revert per release team requirement to wait until
24Q3 becomes ‘next’
Change-Id: I0b11e6f02ee60cbdfadd5d0b1ef32cb58ea18344
| -rw-r--r-- | core/api/current.txt | 4 | ||||
| -rw-r--r-- | core/java/android/app/Activity.java | 15 |
2 files changed, 4 insertions, 15 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 95af71cfa074..7ab234ab3e40 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -4369,7 +4369,7 @@ package android.app { method public final android.media.session.MediaController getMediaController(); method @NonNull public android.view.MenuInflater getMenuInflater(); method @NonNull public android.window.OnBackInvokedDispatcher getOnBackInvokedDispatcher(); - method @Deprecated public final android.app.Activity getParent(); + method public final android.app.Activity getParent(); method @Nullable public android.content.Intent getParentActivityIntent(); method public android.content.SharedPreferences getPreferences(int); method @Nullable public android.net.Uri getReferrer(); @@ -4387,7 +4387,7 @@ package android.app { method public void invalidateOptionsMenu(); method public boolean isActivityTransitionRunning(); method public boolean isChangingConfigurations(); - method @Deprecated public final boolean isChild(); + method public final boolean isChild(); method public boolean isDestroyed(); method public boolean isFinishing(); method public boolean isImmersive(); diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 5d4d5e23d6db..5674a108baaa 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -1174,23 +1174,12 @@ public class Activity extends ContextThemeWrapper return mApplication; } - /** - * Whether this is a child {@link Activity} of an {@link ActivityGroup}. - * - * @deprecated {@link ActivityGroup} is deprecated. - */ - @Deprecated + /** Is this activity embedded inside of another activity? */ public final boolean isChild() { return mParent != null; } - /** - * Returns the parent {@link Activity} if this is a child {@link Activity} of an - * {@link ActivityGroup}. - * - * @deprecated {@link ActivityGroup} is deprecated. - */ - @Deprecated + /** Return the parent activity if this view is an embedded child. */ public final Activity getParent() { return mParent; } |