diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-09-17 14:48:52 -0700 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2012-09-17 14:48:52 -0700 |
commit | 9193ac8ef029767254e4c3dfd49f73156c307f55 (patch) | |
tree | c29af451d2915f939e55adb61761143a0853752d /src | |
parent | 5d54be7c82a3534cb921c9128677f9f299bf01ff (diff) | |
download | android_packages_apps_Snap-9193ac8ef029767254e4c3dfd49f73156c307f55.tar.gz android_packages_apps_Snap-9193ac8ef029767254e4c3dfd49f73156c307f55.tar.bz2 android_packages_apps_Snap-9193ac8ef029767254e4c3dfd49f73156c307f55.zip |
Fix bugs relating to grid/filmstrip switching
Bug: 7180582
Bug: 7146147
Change-Id: I3d2ad8866a938f9f162e14f11bc2e021834ba513
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/app/AlbumPage.java | 1 | ||||
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 1 | ||||
-rw-r--r-- | src/com/android/gallery3d/data/FilterDeleteSet.java | 1 |
3 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java index 298e083c6..fade00c47 100644 --- a/src/com/android/gallery3d/app/AlbumPage.java +++ b/src/com/android/gallery3d/app/AlbumPage.java @@ -567,6 +567,7 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster return true; } case R.id.action_filmstrip: { + if (mAlbumDataAdapter.size() < 1) return true; int targetPhoto = mSlotView.getVisibleStart(); prepareAnimationBackToFilmstrip(targetPhoto); if(mLaunchedFromPhotoPage) { diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index cb6bd705c..df61f89e2 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -352,7 +352,6 @@ public class PhotoPage extends ActivityState implements Log.w(TAG, "failed to restore " + mSetPathString); } if (itemPath == null) { - mMediaSet.reload(); if (mMediaSet.getMediaItemCount() > 0) { itemPath = mMediaSet.getMediaItem(mCurrentIndex, 1) .get(0).getPath(); diff --git a/src/com/android/gallery3d/data/FilterDeleteSet.java b/src/com/android/gallery3d/data/FilterDeleteSet.java index b2b84e86f..fc44d48c4 100644 --- a/src/com/android/gallery3d/data/FilterDeleteSet.java +++ b/src/com/android/gallery3d/data/FilterDeleteSet.java @@ -69,6 +69,7 @@ public class FilterDeleteSet extends MediaSet implements ContentListener { super(path, INVALID_DATA_VERSION); mBaseSet = baseSet; mBaseSet.addContentListener(this); + mMediaItemCount = mBaseSet.getMediaItemCount() - mCurrent.size(); } @Override |