From 57cbaa1ef40d2215c6400f5ae4af3a09e67abb2d Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Fri, 30 Sep 2011 14:42:50 +0800 Subject: 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 --- res/values/strings.xml | 5 + src/com/android/gallery3d/app/ActivityState.java | 7 ++ .../android/gallery3d/app/AlbumDataAdapter.java | 4 - src/com/android/gallery3d/app/AlbumPage.java | 25 +++- src/com/android/gallery3d/app/AlbumSetPage.java | 50 +++++++- src/com/android/gallery3d/app/StateManager.java | 11 +- src/com/android/gallery3d/data/ComboAlbum.java | 6 + src/com/android/gallery3d/data/ComboAlbumSet.java | 6 + src/com/android/gallery3d/data/MediaSet.java | 126 ++++++++++++++++++++- 9 files changed, 220 insertions(+), 20 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 26d80e7a2..74ba1f31b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -199,6 +199,11 @@ Some locations couldn\'t be identified due to network problems. + + Failed to download the photos in this album. Please retry later. + + Failed to download the list of albums. Please retry later. +