summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-01-09 03:19:05 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-01-09 03:19:05 -0800
commit24af2c506c4b7ad200669cc951c43f664228eac9 (patch)
tree549ce34925375eff105b8002ac06a8d97cd5ebda
parent43b064a3edf90ace60360363efdfe26f102e510b (diff)
parentb2786a318d8263db0aaa1ed10b2197a9f3a78d28 (diff)
downloadandroid_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.java4
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;