diff options
author | annieyu <annieyu@huaqin.com> | 2013-04-16 11:46:41 +0800 |
---|---|---|
committer | annieyu <annieyu@huaqin.com> | 2013-04-16 11:46:41 +0800 |
commit | 874c3b987da90a27bdfd81e64c3b5f68e1ca98d9 (patch) | |
tree | d548f0eaccb831fb0c0a08353562e99bd5382aa0 | |
parent | c7e711599ced508057cf96f4a120a8ed8f8636a3 (diff) | |
download | packages_apps_Browser-874c3b987da90a27bdfd81e64c3b5f68e1ca98d9.zip packages_apps_Browser-874c3b987da90a27bdfd81e64c3b5f68e1ca98d9.tar.gz packages_apps_Browser-874c3b987da90a27bdfd81e64c3b5f68e1ca98d9.tar.bz2 |
Fix the problem that a crash occured when user turn off data connect and download something in browser
When user turn off data connect in browser throught statusbar shortcut, the request object is null. It will be crush browser.
Change-Id: Icdbd40618d221cc205e497e860a9508f4cd18741
-rw-r--r-- | src/com/android/browser/FetchUrlMimeType.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/browser/FetchUrlMimeType.java b/src/com/android/browser/FetchUrlMimeType.java index 33b5808..6556b38 100644 --- a/src/com/android/browser/FetchUrlMimeType.java +++ b/src/com/android/browser/FetchUrlMimeType.java @@ -107,9 +107,13 @@ class FetchUrlMimeType extends Thread { } } } catch (IllegalArgumentException ex) { - request.abort(); + if (request != null) { + request.abort(); + } } catch (IOException ex) { - request.abort(); + if (request != null) { + request.abort(); + } } finally { client.close(); } |