summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-04-27 12:27:19 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-04-27 12:27:19 -0700
commit07229e0817eb8a9e507b0a7b0ba3fc8dff839359 (patch)
treeef5893116231f38274f43c35d87967ccf0346640
parent3a04dd3fa9c62d940256057ac36bf5f1f9281eb3 (diff)
parentfaea5646b25a94c669c5c63474d6c1c943599bea (diff)
downloadpackages_apps_Browser-07229e0817eb8a9e507b0a7b0ba3fc8dff839359.zip
packages_apps_Browser-07229e0817eb8a9e507b0a7b0ba3fc8dff839359.tar.gz
packages_apps_Browser-07229e0817eb8a9e507b0a7b0ba3fc8dff839359.tar.bz2
am faea5646: Do not try to open a file that could not be downloaded.
-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