diff options
author | Adam Cohen <adamcohen@google.com> | 2012-04-24 14:36:11 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2012-04-24 14:36:11 -0700 |
commit | 570f51446d7480a9f8293d1bf1709640b70dff2a (patch) | |
tree | 991356f2b70d8767adafa18bbe14636385c2cd84 | |
parent | cb3f98e983cd7ac9f8cf57780632f82c35478efc (diff) | |
download | packages_apps_trebuchet-570f51446d7480a9f8293d1bf1709640b70dff2a.zip packages_apps_trebuchet-570f51446d7480a9f8293d1bf1709640b70dff2a.tar.gz packages_apps_trebuchet-570f51446d7480a9f8293d1bf1709640b70dff2a.tar.bz2 |
Removing drag and drop parity exceptions
Change-Id: I065c9376ebeedc6b11d1ac5805e0326bd7dd8f26
-rw-r--r-- | src/com/android/launcher2/DropTarget.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/launcher2/DropTarget.java b/src/com/android/launcher2/DropTarget.java index 397d462..d627a4c 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); } } } |