diff options
Diffstat (limited to 'src/com/android/providers/downloads/Helpers.java')
-rw-r--r-- | src/com/android/providers/downloads/Helpers.java | 9 |
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 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. |