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

Commit 0bb46778 authored by Chris Li's avatar Chris Li Committed by Automerger Merge Worker
Browse files

Merge "[Bugfix][RemoteAnimation] Fix IndexOutOfBoundsException in...

Merge "[Bugfix][RemoteAnimation] Fix IndexOutOfBoundsException in onAnimationFinished of  RemoteAnimationController" am: 4b7206b8 am: b7e86b3e am: 8d5e4763

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2132452



Change-Id: Ia41ff2eb2dc943ce041693afaadde46939d8d984
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0f867e50 8d5e4763
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ class RemoteAnimationController implements DeathRecipient {
    final ArrayList<NonAppWindowAnimationAdapter> mPendingNonAppAnimations = new ArrayList<>();
    private final Handler mHandler;
    private final Runnable mTimeoutRunnable = () -> cancelAnimation("timeoutRunnable");
    private boolean mIsFinishing;

    private FinishedCallback mFinishedCallback;
    private boolean mCanceled;
@@ -260,6 +261,7 @@ class RemoteAnimationController implements DeathRecipient {
                mPendingAnimations.size());
        mHandler.removeCallbacks(mTimeoutRunnable);
        synchronized (mService.mGlobalLock) {
            mIsFinishing = true;
            unlinkToDeathOfRunner();
            releaseFinishedCallback();
            mService.openSurfaceTransaction();
@@ -304,6 +306,7 @@ class RemoteAnimationController implements DeathRecipient {
                throw e;
            } finally {
                mService.closeSurfaceTransaction("RemoteAnimationController#finished");
                mIsFinishing = false;
            }
        }
        // Reset input for all activities when the remote animation is finished.
@@ -523,6 +526,9 @@ class RemoteAnimationController implements DeathRecipient {

        @Override
        public void onAnimationCancelled(SurfaceControl animationLeash) {
            if (mIsFinishing) {
                return;
            }
            if (mRecord.mAdapter == this) {
                mRecord.mAdapter = null;
            } else {