summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data/ComboAlbumSet.java
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2011-09-30 14:42:50 +0800
committerHung-ying Tyan <tyanh@google.com>2011-10-07 18:57:06 +0800
commit9d62da7986aef9d89356f6b169fafecd8936d9f6 (patch)
tree4c3ab57d55fe238b5503a0afc92fe8e0f3533836 /src/com/android/gallery3d/data/ComboAlbumSet.java
parent78eac46afd4c5b33c8c32f976974ebff6870c0a4 (diff)
downloadandroid_packages_apps_Snap-9d62da7986aef9d89356f6b169fafecd8936d9f6.tar.gz
android_packages_apps_Snap-9d62da7986aef9d89356f6b169fafecd8936d9f6.tar.bz2
android_packages_apps_Snap-9d62da7986aef9d89356f6b169fafecd8936d9f6.zip
Request sync when there's no mediaItem in a mediaSet.
This is to fix the problem where media items haven't been sync'ed when the album set or album is viewed for the first time. + Add MediaSet.SyncListener. + Make AlbumPage and AlbumSetPage implement SyncListener. + Implement requestSync() for ComboAlbum and ComboAlbumSet. + add ActivityState.isDestroyed(). This also fixes the problem where StateManager.finishState() may be called twice. Bug: 5337899 Change-Id: I25364c3ac25721a2650701c5d7931bfb6daa9303
Diffstat (limited to 'src/com/android/gallery3d/data/ComboAlbumSet.java')
-rw-r--r--src/com/android/gallery3d/data/ComboAlbumSet.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/data/ComboAlbumSet.java b/src/com/android/gallery3d/data/ComboAlbumSet.java
index aa196039d..16adc12f4 100644
--- a/src/com/android/gallery3d/data/ComboAlbumSet.java
+++ b/src/com/android/gallery3d/data/ComboAlbumSet.java
@@ -18,6 +18,7 @@ package com.android.gallery3d.data;
import com.android.gallery3d.R;
import com.android.gallery3d.app.GalleryApp;
+import com.android.gallery3d.util.Future;
// ComboAlbumSet combines multiple media sets into one. It lists all sub
// media sets from the input album sets.
@@ -77,4 +78,9 @@ public class ComboAlbumSet extends MediaSet implements ContentListener {
public void onContentDirty() {
notifyContentChanged();
}
+
+ @Override
+ public Future<Integer> requestSync(SyncListener listener) {
+ return requestSyncOnEmptySets(mSets, listener);
+ }
}