From 216fa22791889774b83977341632c4570dcec35d Mon Sep 17 00:00:00 2001 From: Vasu Nori Date: Tue, 12 Oct 2010 23:08:13 -0700 Subject: [PATCH] bug:3069735 in Download UI app, handle deletes correctly gingerbread. (for more detailed comments, please see the dependent CL Change-Id: Ib90eb9e647f543312c865d3bbf9a06fb867a648b ) 2 changes in this CL. 1. add 2 new columns to downloads table in downloads.db: mediaprovider_uri = downloaded file's content_uri in mediaprovider db deleted = flag is set to true if a file is to be deleted 2. download UI app shows only those files whose 'deleted' flag is not set Change-Id: I47c5f72b0a0b354fac3abe3a97752130b8189794 --- api/current.xml | 11 +++++++ core/java/android/app/DownloadManager.java | 35 +++++++++++++++++++++- core/java/android/provider/Downloads.java | 26 ++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/api/current.xml b/api/current.xml index 3c2662dd8610e..0efc4665cbf18 100644 --- a/api/current.xml +++ b/api/current.xml @@ -24649,6 +24649,17 @@ visibility="public" > + + Type: BOOLEAN

+ *

Owner can Read

+ * @hide + */ + public static final String COLUMN_DELETED = "deleted"; + /* * Lists the destinations that an application can specify for a download. */ @@ -881,6 +890,23 @@ public final class Downloads { public static final String COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT = "bypass_recommended_size_limit"; + /** + * Set to true if this download is deleted. It is completely removed from the database + * when MediaProvider database also deletes the metadata asociated with this downloaded file. + *

Type: BOOLEAN

+ *

Owner can Read

+ */ + public static final String COLUMN_DELETED = "deleted"; + + /** + * The URI to the corresponding entry in MediaProvider for this downloaded entry. It is + * used to delete the entries from MediaProvider database when it is deleted from the + * downloaded list. + *

Type: TEXT

+ *

Owner can Read

+ */ + public static final String COLUMN_MEDIAPROVIDER_URI = "mediaprovider_uri"; + /* * Lists the destinations that an application can specify for a download. */