diff options
| -rw-r--r-- | services/java/com/android/server/wm/Session.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/services/java/com/android/server/wm/Session.java b/services/java/com/android/server/wm/Session.java index 03b7546f8a7c..ee62a56ddc1f 100644 --- a/services/java/com/android/server/wm/Session.java +++ b/services/java/com/android/server/wm/Session.java @@ -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"); } |