diff options
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/BrowserDownloadPage.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/com/android/browser/BrowserDownloadPage.java b/src/com/android/browser/BrowserDownloadPage.java index c8f848a..c56991e 100644 --- a/src/com/android/browser/BrowserDownloadPage.java +++ b/src/com/android/browser/BrowserDownloadPage.java @@ -133,13 +133,16 @@ public class BrowserDownloadPage extends ExpandableListActivity { int filenameColumnId = mDownloadCursor.getColumnIndexOrThrow( Downloads.Impl._DATA); String filename = mDownloadCursor.getString(filenameColumnId); - File file = new File(filename); - if (!file.exists()) { - long id = mDownloadCursor.getLong(mIdColumnId); - if (where == null) { - where = Downloads.Impl._ID + " = '" + id + "'"; - } else { - where += " OR " + Downloads.Impl._ID + " = '" + id + "'"; + if (filename != null) { + File file = new File(filename); + if (!file.exists()) { + long id = mDownloadCursor.getLong(mIdColumnId); + if (where == null) { + where = Downloads.Impl._ID + " = '" + id + "'"; + } else { + where += " OR " + Downloads.Impl._ID + " = '" + id + + "'"; + } } } } |