diff options
author | Leon Scroggins <scroggo@google.com> | 2010-04-26 13:36:01 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-04-26 13:36:01 -0400 |
commit | faea5646b25a94c669c5c63474d6c1c943599bea (patch) | |
tree | 4fb6b53bffd25e3cb8a8501a1fb377324c4ad467 /src/com/android | |
parent | c8393d9cfa47e3f5f279b17c412fd363e7ea94bd (diff) | |
download | packages_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.java | 3 |
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 |