diff options
author | John Reck <jreck@google.com> | 2013-01-16 14:10:30 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2013-01-16 18:05:07 -0800 |
commit | 9686d9d07e344fae2f2310ca544e5401b5e11d30 (patch) | |
tree | 7bc66a807f33e3aa016d0e9c977f85cfffbe62f1 /src/com/android/gallery3d/gadget | |
parent | 9003bd581c00a31db4c8291c99a30d5e74fe2dde (diff) | |
download | android_packages_apps_Snap-9686d9d07e344fae2f2310ca544e5401b5e11d30.tar.gz android_packages_apps_Snap-9686d9d07e344fae2f2310ca544e5401b5e11d30.tar.bz2 android_packages_apps_Snap-9686d9d07e344fae2f2310ca544e5401b5e11d30.zip |
New loading model
Rename reload() to loadIfDirty()
loadIfDirty is implemented by MediaSet and is final
loadIfDirty is now blocking instead of async
Subclasses must implement two protected methods, isDirtyLocked() and load()
The change from async reload() to sync loadIfDirty() should be fine since
all users of reload() were doing so from a background thread already, and the
longest load() is PicasaAlbumSet which is still a fairly brisk 40ms or so
Change-Id: If5cc596a1c13e52e5f4efff1a144bd086d37cfb7
Diffstat (limited to 'src/com/android/gallery3d/gadget')
-rw-r--r-- | src/com/android/gallery3d/gadget/MediaSetSource.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/gadget/MediaSetSource.java b/src/com/android/gallery3d/gadget/MediaSetSource.java index caeff2a87..0e7e6bd57 100644 --- a/src/com/android/gallery3d/gadget/MediaSetSource.java +++ b/src/com/android/gallery3d/gadget/MediaSetSource.java @@ -83,7 +83,7 @@ public class MediaSetSource implements WidgetSource, ContentListener { @Override public void reload() { - long version = mSource.reload(); + long version = mSource.loadIfDirty(); if (mSourceVersion != version) { mSourceVersion = version; mCacheStart = 0; |