diff options
author | Hung-ying Tyan <tyanh@google.com> | 2011-09-30 14:42:50 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2011-10-07 18:57:06 +0800 |
commit | 9d62da7986aef9d89356f6b169fafecd8936d9f6 (patch) | |
tree | 4c3ab57d55fe238b5503a0afc92fe8e0f3533836 /src/com/android/gallery3d/app/ActivityState.java | |
parent | 78eac46afd4c5b33c8c32f976974ebff6870c0a4 (diff) | |
download | android_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/app/ActivityState.java')
-rw-r--r-- | src/com/android/gallery3d/app/ActivityState.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/ActivityState.java b/src/com/android/gallery3d/app/ActivityState.java index 6a0c72c52..519eaff58 100644 --- a/src/com/android/gallery3d/app/ActivityState.java +++ b/src/com/android/gallery3d/app/ActivityState.java @@ -46,6 +46,8 @@ abstract public class ActivityState { ResultEntry next; } + private boolean mDestroyed = false; + protected ActivityState() { } @@ -139,5 +141,10 @@ abstract public class ActivityState { } protected void onDestroy() { + mDestroyed = true; + } + + boolean isDestroyed() { + return mDestroyed; } } |