summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-04-21 19:35:14 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-04-21 19:35:14 -0700
commitf4624cdd99f14a0ed507b2caa7bb503331a9de7c (patch)
tree80713e613000fcb1ac143993af04cfdd62973de2
parentd6332987f17158f6af414f9a3433469e25453819 (diff)
parenteb0df2b862f574ba66b428711bf58db1f3ef6830 (diff)
downloadandroid_packages_apps_Gallery2-f4624cdd99f14a0ed507b2caa7bb503331a9de7c.tar.gz
android_packages_apps_Gallery2-f4624cdd99f14a0ed507b2caa7bb503331a9de7c.tar.bz2
android_packages_apps_Gallery2-f4624cdd99f14a0ed507b2caa7bb503331a9de7c.zip
Merge "Gallery: fix "no photo found" when there are photos" into android_ui.lnx.1.2.c1-dev
-rw-r--r--[-rwxr-xr-x]src/com/android/gallery3d/app/TimeLineDataLoader.java7
-rw-r--r--src/com/android/gallery3d/data/ClusterAlbumSet.java2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/app/TimeLineDataLoader.java b/src/com/android/gallery3d/app/TimeLineDataLoader.java
index 7816c2943..f808cea9c 100755..100644
--- a/src/com/android/gallery3d/app/TimeLineDataLoader.java
+++ b/src/com/android/gallery3d/app/TimeLineDataLoader.java
@@ -370,12 +370,13 @@ public class TimeLineDataLoader {
@Override
public void run() {
-
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
boolean updateComplete = false;
+ long version = MediaObject.INVALID_DATA_VERSION;
while (mActive) {
synchronized (this) {
- if (mActive && !mDirty && updateComplete) {
+ if (mActive && !mDirty && updateComplete
+ && version != MediaObject.INVALID_DATA_VERSION) {
updateLoading(false);
if (mFailedVersion != MediaObject.INVALID_DATA_VERSION) {
}
@@ -387,7 +388,7 @@ public class TimeLineDataLoader {
mDirty = false;
}
updateLoading(true);
- long version = mSource.reload();
+ version = mSource.reload();
UpdateInfo info = executeAndWait(new GetUpdateInfo(version));
updateComplete = info == null;
if (updateComplete) {
diff --git a/src/com/android/gallery3d/data/ClusterAlbumSet.java b/src/com/android/gallery3d/data/ClusterAlbumSet.java
index 4046a1595..b46ebaab9 100644
--- a/src/com/android/gallery3d/data/ClusterAlbumSet.java
+++ b/src/com/android/gallery3d/data/ClusterAlbumSet.java
@@ -69,7 +69,7 @@ public class ClusterAlbumSet extends MediaSet implements ContentListener {
@Override
public long reload() {
synchronized(this){
- if (mBaseSet.reload() > mDataVersion) {
+ if (mBaseSet.reload() > mDataVersion && !mBaseSet.isLoading()) {
if (mFirstReloadDone) {
updateClustersContents();
} else {