summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data/LocalVideo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/data/LocalVideo.java')
-rw-r--r--src/com/android/gallery3d/data/LocalVideo.java31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/com/android/gallery3d/data/LocalVideo.java b/src/com/android/gallery3d/data/LocalVideo.java
index 12b3c7acd..4b8774ca4 100644
--- a/src/com/android/gallery3d/data/LocalVideo.java
+++ b/src/com/android/gallery3d/data/LocalVideo.java
@@ -17,10 +17,7 @@
package com.android.gallery3d.data;
import android.content.ContentResolver;
-import android.content.ContentValues;
import android.database.Cursor;
-import android.drm.DrmManagerClientWrapper;
-import android.drm.DrmStore.DrmDeliveryType;
import android.graphics.Bitmap;
import android.graphics.BitmapRegionDecoder;
import android.net.Uri;
@@ -155,18 +152,17 @@ public class LocalVideo extends LocalMediaItem {
@Override
public Job<Bitmap> requestImage(int type) {
- // Drm start
- return new LocalVideoRequest(mApplication, getPath(), dateModifiedInSec,type, filePath, mimeType);
- // Drm end
+ return new LocalVideoRequest(mApplication, getPath(), dateModifiedInSec,
+ type, filePath);
}
public static class LocalVideoRequest extends ImageCacheRequest {
private String mLocalFilePath;
LocalVideoRequest(GalleryApp application, Path path, long timeModified,
- int type, String localFilePath, String mimetype) {
+ int type, String localFilePath) {
super(application, path, timeModified, type,
- MediaItem.getTargetSize(type),localFilePath, mimetype);
+ MediaItem.getTargetSize(type));
mLocalFilePath = localFilePath;
}
@@ -186,24 +182,7 @@ public class LocalVideo extends LocalMediaItem {
@Override
public int getSupportedOperations() {
- int supported = SUPPORT_DELETE | SUPPORT_PLAY | SUPPORT_INFO;
- if (filePath != null && (filePath.endsWith(".dcf") || filePath.endsWith(".dm"))) {
- supported |= SUPPORT_DRM_INFO;
- DrmManagerClientWrapper drmClient = new DrmManagerClientWrapper(mApplication.getAndroidContext());
- ContentValues values = drmClient.getMetadata(filePath);
- int drmType = values.getAsInteger("DRM-TYPE");
- Log.d("LocalVideo", "getSupportedOperations:drmType returned= "
- + Integer.toString(drmType) + " for path= " + filePath);
- if (drmType == DrmDeliveryType.SEPARATE_DELIVERY) {
- supported |= SUPPORT_SHARE;
- }
- if (drmClient != null) drmClient.release();
- } else {
- Log.e("LocalVideo", "yy:share added for path= " + filePath);
- supported |= SUPPORT_SHARE;
- }
-
- return supported;
+ return SUPPORT_DELETE | SUPPORT_SHARE | SUPPORT_PLAY | SUPPORT_INFO | SUPPORT_TRIM | SUPPORT_MUTE;
}
@Override