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

Commit 3bbc2ed1 authored by George Mount's avatar George Mount
Browse files

Fix leak of Bundled data.

Bug 25776890

Change-Id: Ib67c71e2fa01c902ad2b18f46bcaad73a73955ad
parent 734d3993
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -574,14 +574,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