From b8e07a51c1849d6894c5773a3daacedd01294218 Mon Sep 17 00:00:00 2001 From: Steve Howard Date: Wed, 21 Jul 2010 14:53:21 -0700 Subject: DL manager support for broadcasts + connectivity control * Additions to DownloadManager to support control of broadcast intents, allowed network types, and roaming control. This includes new constants and added implementation. * New DB columns to hold connectivity flags and one to indicate whether the download was initiated through the public API; this is used to change behavior related to broadcast intents and connectivity controls. Change-Id: I2e8e4ce92cde7889a0f24dc43b86c596c73c0eaa --- core/java/android/provider/Downloads.java | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'core/java/android/provider') diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java index 2a612fe..01db979 100644 --- a/core/java/android/provider/Downloads.java +++ b/core/java/android/provider/Downloads.java @@ -17,11 +17,6 @@ package android.provider; import android.net.Uri; -import android.content.ContentUris; -import android.content.ContentValues; -import android.content.Context; - -import java.io.File; /** * The Download Manager @@ -856,6 +851,30 @@ public final class Downloads { */ public static final String COLUMN_DESCRIPTION = "description"; + /** + * The name of the column indicating whether the download was requesting through the public + * API. This controls some differences in behavior. + *

Type: BOOLEAN

+ *

Owner can Init/Read

+ */ + public static final String COLUMN_IS_PUBLIC_API = "is_public_api"; + + /** + * The name of the column indicating whether roaming connections can be used. This is only + * used for public API downloads. + *

Type: BOOLEAN

+ *

Owner can Init/Read

+ */ + public static final String COLUMN_ALLOW_ROAMING = "allow_roaming"; + + /** + * The name of the column holding a bitmask of allowed network types. This is only used for + * public API downloads. + *

Type: INTEGER

+ *

Owner can Init/Read

+ */ + public static final String COLUMN_ALLOWED_NETWORK_TYPES = "allowed_network_types"; + /* * Lists the destinations that an application can specify for a download. */ -- cgit v1.1