summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/AlbumSlidingWindow.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/ui/AlbumSlidingWindow.java')
-rw-r--r--src/com/android/gallery3d/ui/AlbumSlidingWindow.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/AlbumSlidingWindow.java b/src/com/android/gallery3d/ui/AlbumSlidingWindow.java
index fec7d1e92..a534c6add 100644
--- a/src/com/android/gallery3d/ui/AlbumSlidingWindow.java
+++ b/src/com/android/gallery3d/ui/AlbumSlidingWindow.java
@@ -24,6 +24,7 @@ import com.android.gallery3d.app.AlbumDataLoader;
import com.android.gallery3d.common.Utils;
import com.android.gallery3d.data.MediaItem;
import com.android.gallery3d.data.MediaObject;
+import com.android.gallery3d.data.LocalMediaItem;
import com.android.gallery3d.data.MediaObject.PanoramaSupportCallback;
import com.android.gallery3d.data.Path;
import com.android.gallery3d.glrenderer.Texture;
@@ -267,6 +268,18 @@ public class AlbumSlidingWindow implements AlbumDataLoader.DataListener {
entry.mediaType = (item == null)
? MediaItem.MEDIA_TYPE_UNKNOWN
: entry.item.getMediaType();
+
+ if (item instanceof LocalMediaItem) {
+ String filePath = ((LocalMediaItem)item).filePath;
+ if (filePath != null && (filePath.endsWith(".dcf") || filePath.endsWith(".dm"))) {
+ if (entry.mediaType == MediaObject.MEDIA_TYPE_IMAGE) {
+ entry.mediaType = MediaObject.MEDIA_TYPE_DRM_IMAGE;
+ } else if (entry.mediaType == MediaObject.MEDIA_TYPE_VIDEO) {
+ entry.mediaType = MediaObject.MEDIA_TYPE_DRM_VIDEO;
+ }
+ }
+ }
+
entry.path = (item == null) ? null : item.getPath();
entry.rotation = (item == null) ? 0 : item.getRotation();
entry.contentLoader = new ThumbnailLoader(slotIndex, entry.item);