Do not try to open a file that could not be downloaded.

Bug 2629391

Change-Id: If4edf356d98f90baf9fa0168d995dc0793ff90ae
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 @@
                 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