diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2015-02-05 04:07:54 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-02-05 04:07:54 -0800 |
| commit | 76a4bf8102db422f2c48d301d5987920fefad452 (patch) | |
| tree | 07f133a5751a3c8bb86ea7a2b11bee80cb0dc8e6 | |
| parent | 27e325a78eb54431192359df30c947f129161183 (diff) | |
| parent | 327b209bbdf2cbf41332fc0a1e1d92ae22e5d6d8 (diff) | |
| download | android_packages_apps_Gallery2-76a4bf8102db422f2c48d301d5987920fefad452.tar.gz android_packages_apps_Gallery2-76a4bf8102db422f2c48d301d5987920fefad452.tar.bz2 android_packages_apps_Gallery2-76a4bf8102db422f2c48d301d5987920fefad452.zip | |
Merge "Gallery2: Notify dirty after update content"
| -rwxr-xr-x | src/com/android/gallery3d/app/PhotoDataAdapter.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/PhotoDataAdapter.java b/src/com/android/gallery3d/app/PhotoDataAdapter.java index 7be48ebeb..c7dd48b1e 100755 --- a/src/com/android/gallery3d/app/PhotoDataAdapter.java +++ b/src/com/android/gallery3d/app/PhotoDataAdapter.java @@ -72,6 +72,7 @@ public class PhotoDataAdapter implements PhotoPage.Model { private static final int BIT_SCREEN_NAIL = 1; private static final int BIT_FULL_IMAGE = 2; + private static final long NOTIFY_DIRTY_WAIT_TIME = 10; // sImageFetchSeq is the fetching sequence for images. // We want to fetch the current screennail first (offset = 0), the next // screennail (offset = +1), then the previous screennail (offset = -1) etc. @@ -1207,6 +1208,12 @@ public class PhotoDataAdapter implements PhotoPage.Model { } public synchronized void notifyDirty() { + while (mDirty) { + try { + wait(NOTIFY_DIRTY_WAIT_TIME); + } catch (Exception ex) { + } + } mDirty = true; notifyAll(); } |
