am ef50c458: Merge "Add slideshow page." into gingerbread
Merge commit 'ef50c458c9f9e970e51e3363a46015b69ba2aa6d' into gingerbread-plus-aosp
* commit 'ef50c458c9f9e970e51e3363a46015b69ba2aa6d':
Add slideshow page.
diff --git a/src/com/cooliris/media/CropImage.java b/src/com/cooliris/media/CropImage.java
index 4c49dc7..f37f584 100644
--- a/src/com/cooliris/media/CropImage.java
+++ b/src/com/cooliris/media/CropImage.java
@@ -132,8 +132,11 @@
MediaScannerConnection connection = mConnectionMap.get(context);
if (connection != null) {
try {
+ final String downloadDirectoryPath = LocalDataSource.DOWNLOAD_BUCKET_NAME;
+ File downloadDirectory = new File(downloadDirectoryPath);
+ downloadDirectory.mkdirs();
final String path = UriTexture.writeHttpDataInDirectory(context, contentUri,
- LocalDataSource.DOWNLOAD_BUCKET_NAME);
+ downloadDirectoryPath);
if (path != null) {
connection.scanFile(path, item.mMimeType);
} else {
diff --git a/src/com/cooliris/media/LocalDataSource.java b/src/com/cooliris/media/LocalDataSource.java
index 7006ba3..54d1d00 100644
--- a/src/com/cooliris/media/LocalDataSource.java
+++ b/src/com/cooliris/media/LocalDataSource.java
@@ -393,6 +393,7 @@
if (cursor.moveToFirst()) {
item = new MediaItem();
CacheService.populateMediaItemFromCursor(item, cr, cursor, uri.toString() + "/");
+ item.mId = id;
}
cursor.close();
cursor = null;
@@ -401,7 +402,6 @@
// If the database operation failed for any reason.
;
}
- item.mId = id;
return item;
}