diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-01-09 03:19:05 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-01-09 03:19:05 -0800 |
| commit | 24af2c506c4b7ad200669cc951c43f664228eac9 (patch) | |
| tree | 549ce34925375eff105b8002ac06a8d97cd5ebda | |
| parent | 43b064a3edf90ace60360363efdfe26f102e510b (diff) | |
| parent | b2786a318d8263db0aaa1ed10b2197a9f3a78d28 (diff) | |
| download | android_packages_apps_Gallery2-24af2c506c4b7ad200669cc951c43f664228eac9.tar.gz android_packages_apps_Gallery2-24af2c506c4b7ad200669cc951c43f664228eac9.tar.bz2 android_packages_apps_Gallery2-24af2c506c4b7ad200669cc951c43f664228eac9.zip | |
Merge "Gallery2: Fix IndexOutOfBoundsException when delete the images/videos"
| -rw-r--r-- | src/com/android/gallery3d/ui/TimeLineSlotView.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/TimeLineSlotView.java b/src/com/android/gallery3d/ui/TimeLineSlotView.java index c2c32234e..2bce76865 100644 --- a/src/com/android/gallery3d/ui/TimeLineSlotView.java +++ b/src/com/android/gallery3d/ui/TimeLineSlotView.java @@ -625,6 +625,10 @@ public class TimeLineSlotView extends GLView { } if (indexEnd<0) { indexEnd = (indexEnd * (- 1)) - 1; } + + if (indexStart > mHeightList.size() - 1) { + indexStart = mHeightList.size() - 1; + } int startSlotIndex = mHeightList.indexOf(mHeightList.get(indexStart)); if(indexEnd> mHeightList.size()-1) { indexEnd = mHeightList.size()-1; |
