summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadInfo.java
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-01-07 16:33:05 -0800
committerJean-Baptiste Queru <jbq@google.com>2010-01-14 16:15:06 -0800
commit7dd92fa94df0a13b4592ee636b7aa2b605f6b473 (patch)
treec33e0e7a7b54fcda28add13c290e0a1b43be0368 /src/com/android/providers/downloads/DownloadInfo.java
parent89ed5d0ede93be7664ebf4bc76029c5ec57e8a85 (diff)
downloadandroid_packages_providers_DownloadProvider-7dd92fa94df0a13b4592ee636b7aa2b605f6b473.tar.gz
android_packages_providers_DownloadProvider-7dd92fa94df0a13b4592ee636b7aa2b605f6b473.tar.bz2
android_packages_providers_DownloadProvider-7dd92fa94df0a13b4592ee636b7aa2b605f6b473.zip
Use the private legacy API
The public API is getting deeply reworked for forward compatibility, but since the Download Manager and the Browser need to continue using the old API, a separate copy is being kept on the side. Bug: 2245521 Change-Id: I85eff6ba9efc68600aa80e8dffa6720b0f2ed155
Diffstat (limited to 'src/com/android/providers/downloads/DownloadInfo.java')
-rw-r--r--src/com/android/providers/downloads/DownloadInfo.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java
index 88cdede2..81895439 100644
--- a/src/com/android/providers/downloads/DownloadInfo.java
+++ b/src/com/android/providers/downloads/DownloadInfo.java
@@ -90,10 +90,10 @@ public class DownloadInfo {
public void sendIntentIfRequested(Uri contentUri, Context context) {
if (mPackage != null && mClass != null) {
- Intent intent = new Intent(Downloads.ACTION_DOWNLOAD_COMPLETED);
+ Intent intent = new Intent(Downloads.Impl.ACTION_DOWNLOAD_COMPLETED);
intent.setClassName(mPackage, mClass);
if (mExtras != null) {
- intent.putExtra(Downloads.COLUMN_NOTIFICATION_EXTRAS, mExtras);
+ intent.putExtra(Downloads.Impl.COLUMN_NOTIFICATION_EXTRAS, mExtras);
}
// We only send the content: URI, for security reasons. Otherwise, malicious
// applications would have an easier time spoofing download results by
@@ -121,7 +121,7 @@ public class DownloadInfo {
* should be started.
*/
public boolean isReadyToStart(long now) {
- if (mControl == Downloads.CONTROL_PAUSED) {
+ if (mControl == Downloads.Impl.CONTROL_PAUSED) {
// the download is paused, so it's not going to start
return false;
}
@@ -129,16 +129,16 @@ public class DownloadInfo {
// status hasn't been initialized yet, this is a new download
return true;
}
- if (mStatus == Downloads.STATUS_PENDING) {
+ if (mStatus == Downloads.Impl.STATUS_PENDING) {
// download is explicit marked as ready to start
return true;
}
- if (mStatus == Downloads.STATUS_RUNNING) {
+ if (mStatus == Downloads.Impl.STATUS_RUNNING) {
// download was interrupted (process killed, loss of power) while it was running,
// without a chance to update the database
return true;
}
- if (mStatus == Downloads.STATUS_RUNNING_PAUSED) {
+ if (mStatus == Downloads.Impl.STATUS_RUNNING_PAUSED) {
if (mNumFailed == 0) {
// download is waiting for network connectivity to return before it can resume
return true;
@@ -160,7 +160,7 @@ public class DownloadInfo {
* by checking the status.
*/
public boolean isReadyToRestart(long now) {
- if (mControl == Downloads.CONTROL_PAUSED) {
+ if (mControl == Downloads.Impl.CONTROL_PAUSED) {
// the download is paused, so it's not going to restart
return false;
}
@@ -168,11 +168,11 @@ public class DownloadInfo {
// download hadn't been initialized yet
return true;
}
- if (mStatus == Downloads.STATUS_PENDING) {
+ if (mStatus == Downloads.Impl.STATUS_PENDING) {
// download is explicit marked as ready to start
return true;
}
- if (mStatus == Downloads.STATUS_RUNNING_PAUSED) {
+ if (mStatus == Downloads.Impl.STATUS_RUNNING_PAUSED) {
if (mNumFailed == 0) {
// download is waiting for network connectivity to return before it can resume
return true;
@@ -190,10 +190,10 @@ public class DownloadInfo {
* completion.
*/
public boolean hasCompletionNotification() {
- if (!Downloads.isStatusCompleted(mStatus)) {
+ if (!Downloads.Impl.isStatusCompleted(mStatus)) {
return false;
}
- if (mVisibility == Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
+ if (mVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
return true;
}
return false;
@@ -206,7 +206,7 @@ public class DownloadInfo {
if (!available) {
return false;
}
- if (mDestination == Downloads.DESTINATION_CACHE_PARTITION_NOROAMING) {
+ if (mDestination == Downloads.Impl.DESTINATION_CACHE_PARTITION_NOROAMING) {
return !roaming;
} else {
return true;