diff options
author | Patrick Dubroy <dubroy@google.com> | 2011-03-07 15:16:00 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-07 15:16:00 -0800 |
commit | f697ac683b955503b51d8412198e07b7aa0055e4 (patch) | |
tree | 7ba791dd20942f348602d8d9f0d1428183146d9a | |
parent | c6163f467e60be6673c888f2bf38ebb5ccd5fca5 (diff) | |
parent | d1837cc69eb222371afdd30890f7215d117510f2 (diff) | |
download | android_packages_apps_Trebuchet-f697ac683b955503b51d8412198e07b7aa0055e4.tar.gz android_packages_apps_Trebuchet-f697ac683b955503b51d8412198e07b7aa0055e4.tar.bz2 android_packages_apps_Trebuchet-f697ac683b955503b51d8412198e07b7aa0055e4.zip |
Merge "Fix 4020235: NPE at com.android.launcher2.DragLayer.onInterceptTouchEvent" into honeycomb-mr1
-rw-r--r-- | src/com/android/launcher2/DragLayer.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java index 2e72f6223..eb539450f 100644 --- a/src/com/android/launcher2/DragLayer.java +++ b/src/com/android/launcher2/DragLayer.java @@ -62,17 +62,19 @@ public class DragLayer extends FrameLayout { // event has occurred which doesn't result in resizing a widget. In this case, we // dismiss any visible resize frames. final Workspace w = (Workspace) findViewById(R.id.workspace); - final CellLayout currentPage = (CellLayout) w.getChildAt(w.getCurrentPage()); - final CellLayoutChildren childrenLayout = currentPage.getChildrenLayout(); + if (w != null) { + final CellLayout currentPage = (CellLayout) w.getChildAt(w.getCurrentPage()); + final CellLayoutChildren childrenLayout = currentPage.getChildrenLayout(); - if (childrenLayout.hasResizeFrames() && !childrenLayout.isWidgetBeingResized()) { - post(new Runnable() { - public void run() { - if (!childrenLayout.isWidgetBeingResized()) { - childrenLayout.clearAllResizeFrames(); + if (childrenLayout.hasResizeFrames() && !childrenLayout.isWidgetBeingResized()) { + post(new Runnable() { + public void run() { + if (!childrenLayout.isWidgetBeingResized()) { + childrenLayout.clearAllResizeFrames(); + } } - } - }); + }); + } } return mDragController.onInterceptTouchEvent(ev); } |