diff options
Diffstat (limited to 'ui/src/com/android/providers')
-rw-r--r-- | ui/src/com/android/providers/downloads/ui/DownloadList.java | 8 | ||||
-rw-r--r-- | ui/src/com/android/providers/downloads/ui/TrampolineActivity.java | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/ui/src/com/android/providers/downloads/ui/DownloadList.java b/ui/src/com/android/providers/downloads/ui/DownloadList.java index 991d70b6..107940c0 100644 --- a/ui/src/com/android/providers/downloads/ui/DownloadList.java +++ b/ui/src/com/android/providers/downloads/ui/DownloadList.java @@ -19,7 +19,6 @@ package com.android.providers.downloads.ui; import android.app.Activity; import android.app.AlertDialog; import android.app.DownloadManager; -import android.content.ActivityNotFoundException; import android.content.ContentUris; import android.content.Context; import android.content.DialogInterface; @@ -530,11 +529,8 @@ public class DownloadList extends Activity { } final long id = cursor.getLong(cursor.getColumnIndexOrThrow(BaseColumns._ID)); - final Intent intent = OpenHelper.buildViewIntent(this, id); - try { - startActivity(intent); - } catch (ActivityNotFoundException ex) { - Toast.makeText(this, R.string.download_no_application_title, Toast.LENGTH_LONG).show(); + if (!OpenHelper.startViewIntent(this, id, 0)) { + Toast.makeText(this, R.string.download_no_application_title, Toast.LENGTH_SHORT).show(); } } diff --git a/ui/src/com/android/providers/downloads/ui/TrampolineActivity.java b/ui/src/com/android/providers/downloads/ui/TrampolineActivity.java index e9cc17ef..f96c04ee 100644 --- a/ui/src/com/android/providers/downloads/ui/TrampolineActivity.java +++ b/ui/src/com/android/providers/downloads/ui/TrampolineActivity.java @@ -92,8 +92,10 @@ public class TrampolineActivity extends Activity { break; case DownloadManager.STATUS_SUCCESSFUL: - final Intent intent = OpenHelper.buildViewIntent(this, id); - startActivity(intent); + if (!OpenHelper.startViewIntent(this, id, 0)) { + Toast.makeText(this, R.string.download_no_application_title, Toast.LENGTH_SHORT) + .show(); + } finish(); break; |