File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
services/java/com/android/server/wm Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,15 @@ public void reportDropResult(IWindow window, boolean consumed) {
306306 synchronized (mService .mWindowMap ) {
307307 long ident = Binder .clearCallingIdentity ();
308308 try {
309- if (mService .mDragState == null || mService .mDragState .mToken != token ) {
309+ if (mService .mDragState == null ) {
310+ // Most likely the drop recipient ANRed and we ended the drag
311+ // out from under it. Log the issue and move on.
312+ Slog .w (WindowManagerService .TAG , "Drop result given but no drag in progress" );
313+ return ;
314+ }
315+
316+ if (mService .mDragState .mToken != token ) {
317+ // We're in a drag, but the wrong window has responded.
310318 Slog .w (WindowManagerService .TAG , "Invalid drop-result claim by " + window );
311319 throw new IllegalStateException ("reportDropResult() by non-recipient" );
312320 }
You can’t perform that action at this time.
0 commit comments