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

Commit ab20e162 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Clear calling identity in finish callback

Test: go/wm-smoke
Fixes: 76138720
Change-Id: Id6b1afd757d4374a401abe4ee68fe99ed182a62e
parent c6d9f7ce
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -16,14 +16,15 @@

package com.android.server.wm;

import static com.android.server.wm.AnimationAdapterProto.REMOTE;
import static com.android.server.wm.RemoteAnimationAdapterWrapperProto.TARGET;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.AnimationAdapterProto.REMOTE;
import static com.android.server.wm.RemoteAnimationAdapterWrapperProto.TARGET;

import android.graphics.Point;
import android.graphics.Rect;
import android.os.Binder;
import android.os.Handler;
import android.os.RemoteException;
import android.os.SystemClock;
@@ -194,6 +195,8 @@ class RemoteAnimationController {

        @Override
        public void onAnimationFinished() throws RemoteException {
            final long token = Binder.clearCallingIdentity();
            try {
                if (mOuter != null) {
                    mOuter.onAnimationFinished();

@@ -201,6 +204,9 @@ class RemoteAnimationController {
                    // RemoteAnimationController which in turn would leak the runner on the client.
                    mOuter = null;
                }
            } finally {
                Binder.restoreCallingIdentity(token);
            }
        }

        /**