Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 660c3c94 authored by Chris Li's avatar Chris Li Committed by Android (Google) Code Review
Browse files

Merge "Deprecate Activity#isChild/getParent" into main

parents 5b3f22f8 a8a2013b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 public final android.app.Activity getParent();
    method @Deprecated 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 public final boolean isChild();
    method @Deprecated public final boolean isChild();
    method public boolean isDestroyed();
    method public boolean isFinishing();
    method public boolean isImmersive();
+13 −2
Original line number Diff line number Diff line
@@ -1174,12 +1174,23 @@ public class Activity extends ContextThemeWrapper
        return mApplication;
    }

    /** Is this activity embedded inside of another activity? */
    /**
     * Whether this is a child {@link Activity} of an {@link ActivityGroup}.
     *
     * @deprecated {@link ActivityGroup} is deprecated.
     */
    @Deprecated
    public final boolean isChild() {
        return mParent != null;
    }

    /** Return the parent activity if this view is an embedded child. */
    /**
     * Returns the parent {@link Activity} if this is a child {@link Activity} of an
     * {@link ActivityGroup}.
     *
     * @deprecated {@link ActivityGroup} is deprecated.
     */
    @Deprecated
    public final Activity getParent() {
        return mParent;
    }