diff options
author | John Reck <jreck@google.com> | 2011-01-11 11:41:13 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-01-11 11:41:13 -0800 |
commit | 0f86b1202a0f9b7487c1ff6d82161d38ce4c6257 (patch) | |
tree | b67d129710c3f3a0602a440b686e91754b293908 /src/com/android/browser/provider | |
parent | 1605bef4e1f99805a801308f97ade622b907dc7a (diff) | |
download | packages_apps_Browser-0f86b1202a0f9b7487c1ff6d82161d38ce4c6257.zip packages_apps_Browser-0f86b1202a0f9b7487c1ff6d82161d38ce4c6257.tar.gz packages_apps_Browser-0f86b1202a0f9b7487c1ff6d82161d38ce4c6257.tar.bz2 |
Fix no preload available crash
Change-Id: If210b29ce09e7bb7cddc6092601b98b77fa8444e
Diffstat (limited to 'src/com/android/browser/provider')
-rw-r--r-- | src/com/android/browser/provider/BrowserProvider2.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java index 919a135..d3fb034 100644 --- a/src/com/android/browser/provider/BrowserProvider2.java +++ b/src/com/android/browser/provider/BrowserProvider2.java @@ -478,6 +478,9 @@ public class BrowserProvider2 extends SQLiteContentProvider { } private byte[] readRaw(Resources res, int id) throws IOException { + if (id == 0) { + return null; + } InputStream is = res.openRawResource(id); try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); |