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

Commit 257e67e4 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Don't inappropriately kill ANRing drop recipients"

parents 8de952bf 05e9c65a
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -306,7 +306,15 @@ final class Session extends IWindowSession.Stub
        synchronized (mService.mWindowMap) {
            long ident = Binder.clearCallingIdentity();
            try {
                if (mService.mDragState == null || mService.mDragState.mToken != token) {
                if (mService.mDragState == null) {
                    // Most likely the drop recipient ANRed and we ended the drag
                    // out from under it.  Log the issue and move on.
                    Slog.w(WindowManagerService.TAG, "Drop result given but no drag in progress");
                    return;
                }

                if (mService.mDragState.mToken != token) {
                    // We're in a drag, but the wrong window has responded.
                    Slog.w(WindowManagerService.TAG, "Invalid drop-result claim by " + window);
                    throw new IllegalStateException("reportDropResult() by non-recipient");
                }