summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/Helpers.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/providers/downloads/Helpers.java')
-rw-r--r--src/com/android/providers/downloads/Helpers.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/providers/downloads/Helpers.java b/src/com/android/providers/downloads/Helpers.java
index 359738aa..543b652d 100644
--- a/src/com/android/providers/downloads/Helpers.java
+++ b/src/com/android/providers/downloads/Helpers.java
@@ -20,12 +20,10 @@ 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;
import android.provider.Downloads;
-import android.util.Config;
import android.util.Log;
import android.webkit.MimeTypeMap;
@@ -91,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,
@@ -132,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.
@@ -384,7 +386,7 @@ public class Helpers {
} catch (RuntimeException ex) {
if (Constants.LOGV) {
Log.d(Constants.TAG, "invalid selection [" + selection + "] triggered " + ex);
- } else if (Config.LOGD) {
+ } else if (false) {
Log.d(Constants.TAG, "invalid selection triggered " + ex);
}
throw ex;