From 9686d9d07e344fae2f2310ca544e5401b5e11d30 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 16 Jan 2013 14:10:30 -0800 Subject: 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 --- src_pd/com/android/gallery3d/picasasource/PicasaSource.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src_pd/com/android/gallery3d') diff --git a/src_pd/com/android/gallery3d/picasasource/PicasaSource.java b/src_pd/com/android/gallery3d/picasasource/PicasaSource.java index 041829169..702b3b5db 100644 --- a/src_pd/com/android/gallery3d/picasasource/PicasaSource.java +++ b/src_pd/com/android/gallery3d/picasasource/PicasaSource.java @@ -67,8 +67,12 @@ public class PicasaSource extends MediaSource { } @Override - public long reload() { - return mDataVersion; + protected boolean isDirtyLocked() { + return false; + } + + @Override + protected void load() { } } -- cgit v1.2.3