summaryrefslogtreecommitdiffstats
path: root/src/com/android/dreams/phototable/PicasaSource.java
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2013-08-14 11:13:17 -0400
committerStephen Hines <srhines@google.com>2013-08-16 02:34:09 +0000
commitd726b5c7619d62b3d363f67df0f354d203f38d48 (patch)
tree6098e37d90c7b7d38ef2478a728cd7b6172a7af6 /src/com/android/dreams/phototable/PicasaSource.java
parentfd71443659f0dda8ba5c8d5cdef96d5965d0bab0 (diff)
downloadandroid_packages_screensavers_PhotoTable-d726b5c7619d62b3d363f67df0f354d203f38d48.tar.gz
android_packages_screensavers_PhotoTable-d726b5c7619d62b3d363f67df0f354d203f38d48.tar.bz2
android_packages_screensavers_PhotoTable-d726b5c7619d62b3d363f67df0f354d203f38d48.zip
add a broadcast receiver that modifies the settings.
Useful for loosly embedding the photo dreams code into other packages. Add support for albums on internal storage. Bug: 8370249 Change-Id: Ibca37c100d7f1f6b87580422591de4d19d726506 (cherry picked from commit 729f5231bf95ec7946fc4c510d44db303b07614d)
Diffstat (limited to 'src/com/android/dreams/phototable/PicasaSource.java')
-rw-r--r--src/com/android/dreams/phototable/PicasaSource.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/dreams/phototable/PicasaSource.java b/src/com/android/dreams/phototable/PicasaSource.java
index 0db98af..0272eb7 100644
--- a/src/com/android/dreams/phototable/PicasaSource.java
+++ b/src/com/android/dreams/phototable/PicasaSource.java
@@ -354,7 +354,7 @@ public class PicasaSource extends CursorPhotoSource {
log(TAG, "can't find the ID column!");
} else {
while (cursor.moveToNext()) {
- String id = TAG + ":" + cursor.getString(idIndex);
+ String id = constructId(cursor.getString(idIndex));
String user = (userIndex >= 0 ? cursor.getString(userIndex) : "-1");
String type = (typeIndex >= 0 ? cursor.getString(typeIndex) : "none");
boolean isPosts = (typeIndex >= 0 && PICASA_POSTS_TYPE.equals(type));
@@ -369,12 +369,12 @@ public class PicasaSource extends CursorPhotoSource {
if (isPosts) {
log(TAG, "replacing " + id + " with " + PICASA_POSTS_TYPE);
- id = TAG + ":" + PICASA_POSTS_TYPE + ":" + user;
+ id = constructId(PICASA_POSTS_TYPE + ":" + user);
}
if (isUpload) {
log(TAG, "replacing " + id + " with " + PICASA_UPLOAD_TYPE);
- id = TAG + ":" + PICASA_UPLOAD_TYPE + ":" + user;
+ id = constructId(PICASA_UPLOAD_TYPE + ":" + user);
}
String thumbnailUrl = null;
@@ -425,6 +425,10 @@ public class PicasaSource extends CursorPhotoSource {
return foundAlbums.values();
}
+ public static String constructId(String serverId) {
+ return TAG + ":" + serverId;
+ }
+
@Override
protected InputStream getStream(ImageData data, int longSide) {
InputStream is = null;