summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlihai <lihai@codeaurora.org>2015-09-11 16:39:15 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-10-09 06:15:00 -0700
commit556b0f6e22a078fbbb105277951f0d88eff5fcdc (patch)
tree9d42ca627152d5cfbfc91bd9792b80d1f82a8fbf /src
parentbec577299fd05d5ee80a44ea93e1ae9a7779647a (diff)
downloadandroid_packages_apps_Gallery2-556b0f6e22a078fbbb105277951f0d88eff5fcdc.tar.gz
android_packages_apps_Gallery2-556b0f6e22a078fbbb105277951f0d88eff5fcdc.tar.bz2
android_packages_apps_Gallery2-556b0f6e22a078fbbb105277951f0d88eff5fcdc.zip
Gallery2: Fix no automatically scrolling bug
The process of loading image is finish, but the media item is null. When the media item is null, resume the photoDataAdapter. Change-Id: Ic9d5765ffbf15dfff6153356e436ed39f7ffa0f8 CRs-Fixed: 905789
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 9f3b85f10..2067a9972 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -564,7 +564,11 @@ public abstract class PhotoPage extends ActivityState implements
public void onLoadingFinished(boolean loadingFailed) {
if (!mModel.isEmpty()) {
MediaItem photo = mModel.getMediaItem(0);
- if (photo != null) updateCurrentPhoto(photo);
+ if (photo != null) {
+ updateCurrentPhoto(photo);
+ } else {
+ mModel.resume();
+ }
} else if (mIsActive) {
// We only want to finish the PhotoPage if there is no
// deletion that the user can undo.