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

Commit 6e09942a authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Fix leak of Bundled data."

parents c38a5d7d 3bbc2ed1
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -575,14 +575,20 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
        setGhostVisibility(View.INVISIBLE);
        mHasStopped = true;
        mIsCanceled = true;
        clearState();
        return super.cancelPendingTransitions();
    }

    @Override
    protected void clearState() {
        mSharedElementsBundle = null;
        mEnterViewsTransition = null;
        mResultReceiver = null;
        if (mBackgroundAnimator != null) {
            mBackgroundAnimator.cancel();
            mBackgroundAnimator = null;
        }
        mActivity = null;
        clearState();
        return super.cancelPendingTransitions();
        super.clearState();
    }

    private void makeOpaque() {
+6 −1
Original line number Diff line number Diff line
@@ -470,6 +470,11 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
            mActivity = null;
        }
        // Clear the state so that we can't hold any references accidentally and leak memory.
        clearState();
    }

    @Override
    protected void clearState() {
        mHandler = null;
        mSharedElementBundle = null;
        if (mBackgroundAnimator != null) {
@@ -477,7 +482,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
            mBackgroundAnimator = null;
        }
        mExitSharedElementBundle = null;
        clearState();
        super.clearState();
    }

    @Override