From 570f51446d7480a9f8293d1bf1709640b70dff2a Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Tue, 24 Apr 2012 14:36:11 -0700 Subject: Removing drag and drop parity exceptions Change-Id: I065c9376ebeedc6b11d1ac5805e0326bd7dd8f26 --- src/com/android/launcher2/DropTarget.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/com/android/launcher2/DropTarget.java') diff --git a/src/com/android/launcher2/DropTarget.java b/src/com/android/launcher2/DropTarget.java index 397d46245..d627a4c2e 100644 --- a/src/com/android/launcher2/DropTarget.java +++ b/src/com/android/launcher2/DropTarget.java @@ -19,6 +19,7 @@ package com.android.launcher2; import android.content.Context; import android.graphics.PointF; import android.graphics.Rect; +import android.util.Log; /** * Interface defining an object that can receive a drag. @@ -26,6 +27,8 @@ import android.graphics.Rect; */ public interface DropTarget { + public static final String TAG = "DropTarget"; + class DragObject { public int x = -1; public int y = -1; @@ -75,28 +78,28 @@ public interface DropTarget { void onDragEnter() { dragParity++; if (dragParity != 1) { - throw new RuntimeException("onDragEnter: Drag contract violated: " + dragParity); + Log.e(TAG, "onDragEnter: Drag contract violated: " + dragParity); } } void onDragExit() { dragParity--; if (dragParity != 0) { - throw new RuntimeException("onDragExit: Drag contract violated: " + dragParity); + Log.e(TAG, "onDragExit: Drag contract violated: " + dragParity); } } @Override public void onDragStart(DragSource source, Object info, int dragAction) { if (dragParity != 0) { - throw new RuntimeException("onDragEnter: Drag contract violated: " + dragParity); + Log.e(TAG, "onDragEnter: Drag contract violated: " + dragParity); } } @Override public void onDragEnd() { if (dragParity != 0) { - throw new RuntimeException("onDragExit: Drag contract violated: " + dragParity); + Log.e(TAG, "onDragExit: Drag contract violated: " + dragParity); } } } -- cgit v1.2.3