summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-04-26 13:36:01 -0400
committerLeon Scroggins <scroggo@google.com>2010-04-26 13:36:01 -0400
commitfaea5646b25a94c669c5c63474d6c1c943599bea (patch)
tree4fb6b53bffd25e3cb8a8501a1fb377324c4ad467 /src/com/android
parentc8393d9cfa47e3f5f279b17c412fd363e7ea94bd (diff)
downloadpackages_apps_Browser-faea5646b25a94c669c5c63474d6c1c943599bea.zip
packages_apps_Browser-faea5646b25a94c669c5c63474d6c1c943599bea.tar.gz
packages_apps_Browser-faea5646b25a94c669c5c63474d6c1c943599bea.tar.bz2
Do not try to open a file that could not be downloaded.
Bug 2629391 Change-Id: If4edf356d98f90baf9fa0168d995dc0793ff90ae
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/browser/OpenDownloadReceiver.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/browser/OpenDownloadReceiver.java b/src/com/android/browser/OpenDownloadReceiver.java
index da53fb2..814aa9c 100644
--- a/src/com/android/browser/OpenDownloadReceiver.java
+++ b/src/com/android/browser/OpenDownloadReceiver.java
@@ -50,7 +50,8 @@ public class OpenDownloadReceiver extends BroadcastReceiver {
String action = intent.getAction();
if (Downloads.ACTION_NOTIFICATION_CLICKED.equals(action)) {
int status = cursor.getInt(3);
- if (Downloads.isStatusCompleted(status)) {
+ if (Downloads.isStatusCompleted(status)
+ && Downloads.isStatusSuccess(status)) {
Intent launchIntent = new Intent(Intent.ACTION_VIEW);
Uri path = Uri.parse(filename);
// If there is no scheme, then it must be a file