diff options
author | Winson Chung <winsonc@google.com> | 2013-07-31 17:19:51 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-07-31 17:19:51 -0700 |
commit | 482a5b6ed389ef943990277e461444626c34ebf2 (patch) | |
tree | c18ef9a6744da59e5016cc3d5e6911329694b04d | |
parent | 707f650c5c9f569f1c4bfe98be00ea77cc24073d (diff) | |
download | android_packages_apps_Trebuchet-482a5b6ed389ef943990277e461444626c34ebf2.tar.gz android_packages_apps_Trebuchet-482a5b6ed389ef943990277e461444626c34ebf2.tar.bz2 android_packages_apps_Trebuchet-482a5b6ed389ef943990277e461444626c34ebf2.zip |
Fixing crash due to grabbing oob screen index. (Bug 10114488)
Change-Id: I9e0c3d9bfcf96f092260a82b930b7ea728b6e98d
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 2d23f362f..9424eef73 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -3717,15 +3717,15 @@ public class Workspace extends SmoothPagedView final int page = getNextPage() + (direction == DragController.SCROLL_LEFT ? -1 : 1); - // Ensure that we are not dragging over to the custom content screen - if (getScreenIdForPageIndex(page) == CUSTOM_CONTENT_SCREEN_ID) { - return false; - } - // We always want to exit the current layout to ensure parity of enter / exit setCurrentDropLayout(null); if (0 <= page && page < getChildCount()) { + // Ensure that we are not dragging over to the custom content screen + if (getScreenIdForPageIndex(page) == CUSTOM_CONTENT_SCREEN_ID) { + return false; + } + CellLayout layout = (CellLayout) getChildAt(page); setCurrentDragOverlappingLayout(layout); |