Expose more Download Manager APIs.
This will allow apps to track download progress.
Change-Id: Id6b77c0fc01b4838fca45e2fe241b1ea08e65038
diff --git a/api/current.xml b/api/current.xml
index 56e8cb6..2a42fcf 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -86049,6 +86049,54 @@
deprecated="not deprecated"
visibility="public"
>
+<method name="getProgressColumnCurrentBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProgressColumnId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProgressColumnTotalBytes"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProgressCursor"
+ return="android.database.Cursor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="id" type="long">
+</parameter>
+</method>
<method name="getStatus"
return="android.net.Downloads.StatusInfo"
abstract="false"
diff --git a/core/java/android/net/Downloads.java b/core/java/android/net/Downloads.java
index a794af2..07ee9e1a 100644
--- a/core/java/android/net/Downloads.java
+++ b/core/java/android/net/Downloads.java
@@ -296,21 +296,24 @@
}
/**
- * @pending
+ * The column for the id in the Cursor returned by
+ * {@link #getProgressCursor()}
*/
public static final int getProgressColumnId() {
return 0;
}
/**
- * @pending
+ * The column for the current byte count in the Cursor returned by
+ * {@link #getProgressCursor()}
*/
public static final int getProgressColumnCurrentBytes() {
return 1;
}
/**
- * @pending
+ * The column for the total byte count in the Cursor returned by
+ * {@link #getProgressCursor()}
*/
public static final int getProgressColumnTotalBytes() {
return 2;
@@ -324,7 +327,7 @@
};
/**
- * @pending
+ * Returns a Cursor representing the progress of the download identified by the ID.
*/
public static final Cursor getProgressCursor(Context context, long id) {
Uri downloadUri = Uri.withAppendedPath(android.provider.Downloads.Impl.CONTENT_URI,