diff options
author | Leon Scroggins <scroggo@google.com> | 2010-01-22 09:35:34 -0500 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-01-22 09:39:07 -0500 |
commit | 581abbbbeba49e64219e5f11f8a8474760a2f902 (patch) | |
tree | af303eb84ae79ec25c967c7d843e4e7ccfd50e27 /src/com/android/providers/downloads/DownloadNotification.java | |
parent | 4d3a380d338b1f6ee120fb9de2001f138be398ff (diff) | |
download | android_packages_providers_DownloadProvider-581abbbbeba49e64219e5f11f8a8474760a2f902.tar.gz android_packages_providers_DownloadProvider-581abbbbeba49e64219e5f11f8a8474760a2f902.tar.bz2 android_packages_providers_DownloadProvider-581abbbbeba49e64219e5f11f8a8474760a2f902.zip |
Revert "Download files even if there is no activity to launch them."
This reverts commit 0f1aae327a9e4c68044d767e9bafbac747b6d985.
I misunderstood the bug. We do not want to be able to download
files for which there is currently no Activity to launch them.
Diffstat (limited to 'src/com/android/providers/downloads/DownloadNotification.java')
-rw-r--r-- | src/com/android/providers/downloads/DownloadNotification.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/com/android/providers/downloads/DownloadNotification.java b/src/com/android/providers/downloads/DownloadNotification.java index 4c7cec4e..abd975bc 100644 --- a/src/com/android/providers/downloads/DownloadNotification.java +++ b/src/com/android/providers/downloads/DownloadNotification.java @@ -21,7 +21,6 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; -import android.content.pm.PackageManager; import android.database.Cursor; import android.net.Uri; import android.provider.Downloads; @@ -235,8 +234,7 @@ class DownloadNotification { Downloads.Impl.COLUMN_STATUS, Downloads.Impl._DATA, Downloads.Impl.COLUMN_LAST_MODIFICATION, - Downloads.Impl.COLUMN_DESTINATION, - Downloads.Impl.COLUMN_MIME_TYPE + Downloads.Impl.COLUMN_DESTINATION }, WHERE_COMPLETED, null, Downloads.Impl._ID); @@ -256,7 +254,6 @@ class DownloadNotification { final int filenameColumnId = 8; final int lastModColumnId = 9; final int destinationColumnId = 10; - final int mimeTypeColumnId = 11; for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) { // Add the notifications @@ -285,13 +282,7 @@ class DownloadNotification { } else { caption = mContext.getResources() .getString(R.string.notification_download_complete); - if (c.getInt(destinationColumnId) == Downloads.Impl.DESTINATION_EXTERNAL - // If there is no Activity to view the file, show the - // list - && null != mContext.getPackageManager().resolveActivity( - new Intent().setDataAndType(Uri.fromParts("file", "", - null), c.getString(mimeTypeColumnId)), - PackageManager.MATCH_DEFAULT_ONLY)) { + if (c.getInt(destinationColumnId) == Downloads.Impl.DESTINATION_EXTERNAL) { intent = new Intent(Constants.ACTION_OPEN); } else { intent = new Intent(Constants.ACTION_LIST); |