summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-10-10 21:56:07 (GMT)
committerJeff Sharkey <jsharkey@android.com>2013-10-10 21:56:07 (GMT)
commitc9b683f739017c2f5e86661753f0ab1c44f359fa (patch)
treea3aaf2d222ef5feebfcca9a81c7548a8964ec8da
parentd3e8c8b58754062342080965abf86f16c678bde9 (diff)
downloadandroid_packages_providers_DownloadProvider-c9b683f739017c2f5e86661753f0ab1c44f359fa.zip
android_packages_providers_DownloadProvider-c9b683f739017c2f5e86661753f0ab1c44f359fa.tar.gz
android_packages_providers_DownloadProvider-c9b683f739017c2f5e86661753f0ab1c44f359fa.tar.bz2
No directories in Downloads.
Bug: 11166290 Change-Id: I29c9cf53c77d03d1bcf408edd693b9c24d5665b6
-rw-r--r--src/com/android/providers/downloads/DownloadStorageProvider.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/DownloadStorageProvider.java b/src/com/android/providers/downloads/DownloadStorageProvider.java
index d9a0aa6..ecef54e 100644
--- a/src/com/android/providers/downloads/DownloadStorageProvider.java
+++ b/src/com/android/providers/downloads/DownloadStorageProvider.java
@@ -104,6 +104,10 @@ public class DownloadStorageProvider extends DocumentsProvider {
@Override
public String createDocument(String docId, String mimeType, String displayName)
throws FileNotFoundException {
+ if (Document.MIME_TYPE_DIR.equals(mimeType)) {
+ throw new FileNotFoundException("Directory creation not supported");
+ }
+
final File parent = Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_DOWNLOADS);
parent.mkdirs();