From 0a17c2a28738d6ecb274def0e8e54f556d89f5f3 Mon Sep 17 00:00:00 2001 From: Gloria Wang Date: Wed, 16 Feb 2011 11:58:51 -0800 Subject: Download provider change for DRM Forward Lock plugin: to convert .dm files to .fl files during downloading For bug 3188041 Change-Id: I882b851664432fba3e57dc25a6be827b48006e69 --- src/com/android/providers/downloads/Helpers.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/com/android/providers/downloads/Helpers.java') diff --git a/src/com/android/providers/downloads/Helpers.java b/src/com/android/providers/downloads/Helpers.java index 359738aa..ab09551a 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; @@ -91,7 +90,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, @@ -132,7 +135,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. -- cgit v1.2.3