summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2010-05-25 12:16:01 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-05-25 12:16:01 -0700
commitd822fbec460b79bdad7fb33563d85094bdd606fc (patch)
tree3efeec12a97f9c6996ce2dfbd90e45107008ccf4 /src
parentab285f8574c7807a3e8a4f5b26d5e06b870d19ce (diff)
parentcdc4973136e57d874ad826c7138289a23513ce90 (diff)
downloadandroid_packages_apps_Trebuchet-d822fbec460b79bdad7fb33563d85094bdd606fc.tar.gz
android_packages_apps_Trebuchet-d822fbec460b79bdad7fb33563d85094bdd606fc.tar.bz2
android_packages_apps_Trebuchet-d822fbec460b79bdad7fb33563d85094bdd606fc.zip
am cdc49731: Merge "Ignore requests to add items to non-existant screens." into froyo
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/Workspace.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index f65d956f0..c337c3078 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();