summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/Helpers.java
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-03 14:36:27 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-03 14:36:27 -0700
commit9356a4a9b1b1e5be9a3bd639cd89bb30aa6a5ae5 (patch)
treeca73fdc56dc900decb29980d03cb4f8778e3e8eb /src/com/android/providers/downloads/Helpers.java
parent9321f8656228b57f42549536512de684ce584a4d (diff)
parent0a17c2a28738d6ecb274def0e8e54f556d89f5f3 (diff)
downloadandroid_packages_providers_DownloadProvider-9356a4a9b1b1e5be9a3bd639cd89bb30aa6a5ae5.tar.gz
android_packages_providers_DownloadProvider-9356a4a9b1b1e5be9a3bd639cd89bb30aa6a5ae5.tar.bz2
android_packages_providers_DownloadProvider-9356a4a9b1b1e5be9a3bd639cd89bb30aa6a5ae5.zip
Merge "Download provider change for DRM Forward Lock plugin: to convert .dm files to .fl files during downloading For bug 3188041"
Diffstat (limited to 'src/com/android/providers/downloads/Helpers.java')
-rw-r--r--src/com/android/providers/downloads/Helpers.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/providers/downloads/Helpers.java b/src/com/android/providers/downloads/Helpers.java
index 1ac77d51..543b652d 100644
--- a/src/com/android/providers/downloads/Helpers.java
+++ b/src/com/android/providers/downloads/Helpers.java
@@ -20,7 +20,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.drm.mobile1.DrmRawContent;
import android.net.Uri;
import android.os.Environment;
import android.os.SystemClock;
@@ -90,7 +89,11 @@ public class Helpers {
destination);
}
storageManager.verifySpace(destination, path, contentLength);
- return getFullPath(path, mimeType, destination, base);
+ path = getFullPath(path, mimeType, destination, base);
+ if (DownloadDrmHelper.isDrmConvertNeeded(mimeType)) {
+ path = DownloadDrmHelper.modifyDrmFwLockFileExtension(path);
+ }
+ return path;
}
static String getFullPath(String filename, String mimeType, int destination,
@@ -131,7 +134,7 @@ public class Helpers {
throw new StopRequestException(Downloads.Impl.STATUS_NOT_ACCEPTABLE,
"external download with no mime type not allowed");
}
- if (!DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING.equalsIgnoreCase(mimeType)) {
+ if (!DownloadDrmHelper.isDrmMimeType(context, mimeType)) {
// Check to see if we are allowed to download this file. Only files
// that can be handled by the platform can be downloaded.
// special case DRM files, which we should always allow downloading.