summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomasz Mikolajewski <mtomasz@google.com>2016-02-03 02:11:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-02-03 02:11:16 +0000
commitfe20efab34878afca17f117734389559e4e526fb (patch)
tree9583193864e2dff5d4719f710e96dba13dba975b /src
parent139179396f7c9bc94c67d45cd93c82bc56b6cae2 (diff)
parent83a4964a2857ef9af91a02233633a734b8e913e7 (diff)
downloadandroid_packages_providers_DownloadProvider-fe20efab34878afca17f117734389559e4e526fb.tar.gz
android_packages_providers_DownloadProvider-fe20efab34878afca17f117734389559e4e526fb.tar.bz2
android_packages_providers_DownloadProvider-fe20efab34878afca17f117734389559e4e526fb.zip
Merge "Always return FLAG_ARCHIVE for archives in DownloadProvider."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/providers/downloads/DownloadStorageProvider.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/com/android/providers/downloads/DownloadStorageProvider.java b/src/com/android/providers/downloads/DownloadStorageProvider.java
index 77b8fe49..cc04d4de 100644
--- a/src/com/android/providers/downloads/DownloadStorageProvider.java
+++ b/src/com/android/providers/downloads/DownloadStorageProvider.java
@@ -174,7 +174,7 @@ public class DownloadStorageProvider extends DocumentsProvider {
if (cursor.moveToFirst()) {
// We don't know if this queryDocument() call is from Downloads (manage)
// or Files. Safely assume it's Files.
- includeDownloadFromCursor(result, cursor, false /* forManage */);
+ includeDownloadFromCursor(result, cursor);
}
} finally {
IoUtils.closeQuietly(cursor);
@@ -202,7 +202,7 @@ public class DownloadStorageProvider extends DocumentsProvider {
.setFilterByStatus(DownloadManager.STATUS_SUCCESSFUL));
copyNotificationUri(result, cursor);
while (cursor.moveToNext()) {
- includeDownloadFromCursor(result, cursor, false /* forManage */);
+ includeDownloadFromCursor(result, cursor);
}
} finally {
IoUtils.closeQuietly(cursor);
@@ -229,7 +229,7 @@ public class DownloadStorageProvider extends DocumentsProvider {
new DownloadManager.Query().setOnlyIncludeVisibleInDownloadsUi(true));
copyNotificationUri(result, cursor);
while (cursor.moveToNext()) {
- includeDownloadFromCursor(result, cursor, true /* forManage */);
+ includeDownloadFromCursor(result, cursor);
}
} finally {
IoUtils.closeQuietly(cursor);
@@ -263,7 +263,7 @@ public class DownloadStorageProvider extends DocumentsProvider {
continue;
}
- includeDownloadFromCursor(result, cursor, false /* forManage */);
+ includeDownloadFromCursor(result, cursor);
}
} finally {
IoUtils.closeQuietly(cursor);
@@ -306,7 +306,7 @@ public class DownloadStorageProvider extends DocumentsProvider {
Document.FLAG_DIR_PREFERS_LAST_MODIFIED | Document.FLAG_DIR_SUPPORTS_CREATE);
}
- private void includeDownloadFromCursor(MatrixCursor result, Cursor cursor, boolean forManage) {
+ private void includeDownloadFromCursor(MatrixCursor result, Cursor cursor) {
final long id = cursor.getLong(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_ID));
final String docId = String.valueOf(id);
@@ -359,8 +359,7 @@ public class DownloadStorageProvider extends DocumentsProvider {
flags |= Document.FLAG_SUPPORTS_THUMBNAIL;
}
- // TODO: Remove forManage and move the logic to DocumentsUI. b/26321218.
- if (!forManage && mArchiveHelper.isSupportedArchiveType(mimeType)) {
+ if (mArchiveHelper.isSupportedArchiveType(mimeType)) {
flags |= Document.FLAG_ARCHIVE;
}