From 7eeb00e767afa7761c28fc96007505043c69c7f5 Mon Sep 17 00:00:00 2001 From: Bobby Georgescu Date: Fri, 19 Oct 2012 15:43:38 -0700 Subject: Fix delete and undo behavior on filmstrip Bug: 7353749 Change-Id: Ib0abd3f71783c01b1df418dd76e674bf05e65ce7 --- src/com/android/gallery3d/app/PhotoDataAdapter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/com/android/gallery3d/app/PhotoDataAdapter.java') diff --git a/src/com/android/gallery3d/app/PhotoDataAdapter.java b/src/com/android/gallery3d/app/PhotoDataAdapter.java index 20f15be10..731b3fc79 100644 --- a/src/com/android/gallery3d/app/PhotoDataAdapter.java +++ b/src/com/android/gallery3d/app/PhotoDataAdapter.java @@ -1070,8 +1070,12 @@ public class PhotoDataAdapter implements PhotoPage.Model { // case the index needs to be limited to [0, mSize). if (index == MediaSet.INDEX_NOT_FOUND) { index = info.indexHint; - if (mFocusHintDirection == FOCUS_HINT_PREVIOUS - && index > 0) { + int focusHintDirection = mFocusHintDirection; + if (index == (mCameraIndex + 1)) { + focusHintDirection = FOCUS_HINT_NEXT; + } + if (focusHintDirection == FOCUS_HINT_PREVIOUS + && index > 0) { index--; } } -- cgit v1.2.3