summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2013-03-21 21:22:33 (GMT)
committerJohn Reck <jreck@google.com>2013-03-21 21:42:46 (GMT)
commit51177aac9078da153bcb191864fb368faf105681 (patch)
tree0b4774e431a7a27e7a26f93afda8e68ba4b7e058 /tests
parent03d6a96b088e6a3d8884cc4025c9d7cb9550c2f2 (diff)
downloadandroid_packages_apps_Snap-51177aac9078da153bcb191864fb368faf105681.zip
android_packages_apps_Snap-51177aac9078da153bcb191864fb368faf105681.tar.gz
android_packages_apps_Snap-51177aac9078da153bcb191864fb368faf105681.tar.bz2
Revert "New loading model"
Change-Id: I5d3d4c7a4ca0d11de01278529e1413fc62e6b4ed
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/gallery3d/data/LocalDataTest.java6
-rw-r--r--tests/src/com/android/gallery3d/data/MockSet.java9
-rw-r--r--tests/src/com/android/gallery3d/data/RealDataTest.java6
3 files changed, 8 insertions, 13 deletions
diff --git a/tests/src/com/android/gallery3d/data/LocalDataTest.java b/tests/src/com/android/gallery3d/data/LocalDataTest.java
index 67fc97a..8f6a46b 100644
--- a/tests/src/com/android/gallery3d/data/LocalDataTest.java
+++ b/tests/src/com/android/gallery3d/data/LocalDataTest.java
@@ -66,7 +66,7 @@ public class LocalDataTest extends AndroidTestCase {
Path path = Path.fromString(
mIsImage ? "/local/image" : "/local/video");
mAlbumSet = new LocalAlbumSet(path, mApp);
- mAlbumSet.loadIfDirty();
+ mAlbumSet.reload();
verifyResult();
}
@@ -200,7 +200,7 @@ public class LocalDataTest extends AndroidTestCase {
sub.delete();
mAlbumSet.fakeChange();
latch.isOnContentDirtyBeCalled(DEFAULT_TIMEOUT);
- mAlbumSet.loadIfDirty();
+ mAlbumSet.reload();
assertEquals(1, mAlbumSet.getSubMediaSetCount());
}
}
@@ -220,7 +220,7 @@ public class LocalDataTest extends AndroidTestCase {
assertEquals(1, sub.getMediaItemCount());
assertTrue((sub.getSupportedOperations() & MediaSet.SUPPORT_DELETE) != 0);
sub.delete();
- sub.loadIfDirty();
+ sub.reload();
assertEquals(0, sub.getMediaItemCount());
}
}
diff --git a/tests/src/com/android/gallery3d/data/MockSet.java b/tests/src/com/android/gallery3d/data/MockSet.java
index 42f874b..fa83c79 100644
--- a/tests/src/com/android/gallery3d/data/MockSet.java
+++ b/tests/src/com/android/gallery3d/data/MockSet.java
@@ -82,12 +82,7 @@ public class MockSet extends MediaSet {
}
@Override
- protected boolean isDirtyLocked() {
- return false;
+ public long reload() {
+ return 0;
}
-
- @Override
- protected void load() throws InterruptedException {
- }
-
}
diff --git a/tests/src/com/android/gallery3d/data/RealDataTest.java b/tests/src/com/android/gallery3d/data/RealDataTest.java
index 7a984ef..526cfe3 100644
--- a/tests/src/com/android/gallery3d/data/RealDataTest.java
+++ b/tests/src/com/android/gallery3d/data/RealDataTest.java
@@ -53,7 +53,7 @@ public class RealDataTest extends AndroidTestCase {
class TestLocalImage {
public void run() {
MediaSet set = mDataManager.getMediaSet("/local/image");
- set.loadIfDirty();
+ set.reload();
Log.v(TAG, "LocalAlbumSet (Image)");
dumpMediaSet(set, "");
}
@@ -62,7 +62,7 @@ public class RealDataTest extends AndroidTestCase {
class TestLocalVideo {
public void run() {
MediaSet set = mDataManager.getMediaSet("/local/video");
- set.loadIfDirty();
+ set.reload();
Log.v(TAG, "LocalAlbumSet (Video)");
dumpMediaSet(set, "");
}
@@ -71,7 +71,7 @@ public class RealDataTest extends AndroidTestCase {
class TestPicasa implements Runnable {
public void run() {
MediaSet set = mDataManager.getMediaSet("/picasa");
- set.loadIfDirty();
+ set.reload();
Log.v(TAG, "PicasaAlbumSet");
dumpMediaSet(set, "");
}