Cursor listeners can use setPhotoIndex meaningfully

Cursor listeners can now use setPhotoIndex and have the changes take
effect immediately. It appears that nobody in code search will have
their code broken by this change.

Change-Id: I76afd8545310c24f05307d38ed03081914a17987
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();
             }