diff options
author | Daniel Sandler <dsandler@android.com> | 2010-05-25 12:09:36 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-05-25 12:09:36 -0700 |
commit | cdc4973136e57d874ad826c7138289a23513ce90 (patch) | |
tree | 5d15226228b51fb7c8d652fd4eff34b503f1079e /src/com/android/launcher2 | |
parent | 2e2656ccaa5ed6cc1adc2d50c8efb67777422834 (diff) | |
parent | 291ad12232c98e383d44d76ffe09e97e204c61bc (diff) | |
download | packages_apps_trebuchet-cdc4973136e57d874ad826c7138289a23513ce90.zip packages_apps_trebuchet-cdc4973136e57d874ad826c7138289a23513ce90.tar.gz packages_apps_trebuchet-cdc4973136e57d874ad826c7138289a23513ce90.tar.bz2 |
Merge "Ignore requests to add items to non-existant screens." into froyo
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index f65d956..c337c30 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -36,6 +36,7 @@ import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import android.util.AttributeSet; +import android.util.Log; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; @@ -363,7 +364,9 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag */ void addInScreen(View child, int screen, int x, int y, int spanX, int spanY, boolean insert) { if (screen < 0 || screen >= getChildCount()) { - throw new IllegalStateException("The screen must be >= 0 and < " + getChildCount()); + Log.e(TAG, "The screen must be >= 0 and < " + getChildCount() + + " (was " + screen + "); skipping child"); + return; } clearVacantCache(); |