Merge "Cursor listeners can use setPhotoIndex meaningfully"
diff --git a/src/com/android/ex/photo/PhotoViewActivity.java b/src/com/android/ex/photo/PhotoViewActivity.java
index e0d8292..5e45f5e 100644
--- a/src/com/android/ex/photo/PhotoViewActivity.java
+++ b/src/com/android/ex/photo/PhotoViewActivity.java
@@ -323,6 +323,9 @@
}
mIsEmpty = false;
+ mAdapter.swapCursor(data);
+ notifyCursorListeners(data);
+
// set the selected photo
int itemIndex = mPhotoIndex;
@@ -331,9 +334,6 @@
itemIndex = 0;
}
- mAdapter.swapCursor(data);
- notifyCursorListeners(data);
-
mViewPager.setCurrentItem(itemIndex, false);
setViewActivated();
}