summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/downloads/DownloadReceiver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/providers/downloads/DownloadReceiver.java')
-rw-r--r--src/com/android/providers/downloads/DownloadReceiver.java39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/com/android/providers/downloads/DownloadReceiver.java b/src/com/android/providers/downloads/DownloadReceiver.java
index 2065c649..e8f10e7d 100644
--- a/src/com/android/providers/downloads/DownloadReceiver.java
+++ b/src/com/android/providers/downloads/DownloadReceiver.java
@@ -86,22 +86,23 @@ public class DownloadReceiver extends BroadcastReceiver {
intent.getData(), null, null, null, null);
if (cursor != null) {
if (cursor.moveToFirst()) {
- int statusColumn = cursor.getColumnIndexOrThrow(Downloads.COLUMN_STATUS);
+ int statusColumn = cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_STATUS);
int status = cursor.getInt(statusColumn);
int visibilityColumn =
- cursor.getColumnIndexOrThrow(Downloads.COLUMN_VISIBILITY);
+ cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_VISIBILITY);
int visibility = cursor.getInt(visibilityColumn);
- if (Downloads.isStatusCompleted(status)
- && visibility == Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
+ if (Downloads.Impl.isStatusCompleted(status)
+ && visibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
ContentValues values = new ContentValues();
- values.put(Downloads.COLUMN_VISIBILITY, Downloads.VISIBILITY_VISIBLE);
+ values.put(Downloads.Impl.COLUMN_VISIBILITY,
+ Downloads.Impl.VISIBILITY_VISIBLE);
context.getContentResolver().update(intent.getData(), values, null, null);
}
if (intent.getAction().equals(Constants.ACTION_OPEN)) {
- int filenameColumn = cursor.getColumnIndexOrThrow(Downloads._DATA);
+ int filenameColumn = cursor.getColumnIndexOrThrow(Downloads.Impl._DATA);
int mimetypeColumn =
- cursor.getColumnIndexOrThrow(Downloads.COLUMN_MIME_TYPE);
+ cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_MIME_TYPE);
String filename = cursor.getString(filenameColumn);
String mimetype = cursor.getString(mimetypeColumn);
Uri path = Uri.parse(filename);
@@ -122,17 +123,18 @@ public class DownloadReceiver extends BroadcastReceiver {
// swallow the exception entirely
}
} else {
- int packageColumn =
- cursor.getColumnIndexOrThrow(Downloads.COLUMN_NOTIFICATION_PACKAGE);
- int classColumn =
- cursor.getColumnIndexOrThrow(Downloads.COLUMN_NOTIFICATION_CLASS);
+ int packageColumn = cursor.getColumnIndexOrThrow(
+ Downloads.Impl.COLUMN_NOTIFICATION_PACKAGE);
+ int classColumn = cursor.getColumnIndexOrThrow(
+ Downloads.Impl.COLUMN_NOTIFICATION_CLASS);
String pckg = cursor.getString(packageColumn);
String clazz = cursor.getString(classColumn);
if (pckg != null && clazz != null) {
- Intent appIntent = new Intent(Downloads.ACTION_NOTIFICATION_CLICKED);
+ Intent appIntent =
+ new Intent(Downloads.Impl.ACTION_NOTIFICATION_CLICKED);
appIntent.setClassName(pckg, clazz);
if (intent.getBooleanExtra("multiple", true)) {
- appIntent.setData(Downloads.CONTENT_URI);
+ appIntent.setData(Downloads.Impl.CONTENT_URI);
} else {
appIntent.setData(intent.getData());
}
@@ -155,15 +157,16 @@ public class DownloadReceiver extends BroadcastReceiver {
intent.getData(), null, null, null, null);
if (cursor != null) {
if (cursor.moveToFirst()) {
- int statusColumn = cursor.getColumnIndexOrThrow(Downloads.COLUMN_STATUS);
+ int statusColumn = cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_STATUS);
int status = cursor.getInt(statusColumn);
int visibilityColumn =
- cursor.getColumnIndexOrThrow(Downloads.COLUMN_VISIBILITY);
+ cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_VISIBILITY);
int visibility = cursor.getInt(visibilityColumn);
- if (Downloads.isStatusCompleted(status)
- && visibility == Downloads.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
+ if (Downloads.Impl.isStatusCompleted(status)
+ && visibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
ContentValues values = new ContentValues();
- values.put(Downloads.COLUMN_VISIBILITY, Downloads.VISIBILITY_VISIBLE);
+ values.put(Downloads.Impl.COLUMN_VISIBILITY,
+ Downloads.Impl.VISIBILITY_VISIBLE);
context.getContentResolver().update(intent.getData(), values, null, null);
}
}