summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-01-07 06:12:08 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-07 06:12:08 -0800
commit5f6bcc17e94e53af155570bb4a1c774eada7ec4e (patch)
tree4074aaf30b921075d473305f6f53b57bb3ed261a
parenta270bd59a8e6d291af8c1cfcf13af5260ec0ed5a (diff)
parent7a1121511d8b587a3ab9fc971c0e85cef38f3f81 (diff)
downloadframeworks_base-5f6bcc17e94e53af155570bb4a1c774eada7ec4e.zip
frameworks_base-5f6bcc17e94e53af155570bb4a1c774eada7ec4e.tar.gz
frameworks_base-5f6bcc17e94e53af155570bb4a1c774eada7ec4e.tar.bz2
Merge "Remove some superfluous null-checks when constructing a CacheResult" into honeycomb
-rw-r--r--core/java/android/webkit/CacheManager.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index 9eecafa..8bb53e3 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -734,8 +734,7 @@ public final class CacheManager {
CacheResult ret = new CacheResult();
ret.httpStatusCode = statusCode;
- String location = headers.getLocation();
- if (location != null) ret.location = location;
+ ret.location = headers.getLocation();
ret.expires = -1;
ret.expiresString = headers.getExpires();
@@ -754,15 +753,9 @@ public final class CacheManager {
}
}
- String contentDisposition = headers.getContentDisposition();
- if (contentDisposition != null) {
- ret.contentdisposition = contentDisposition;
- }
+ ret.contentdisposition = headers.getContentDisposition();
- String crossDomain = headers.getXPermittedCrossDomainPolicies();
- if (crossDomain != null) {
- ret.crossDomain = crossDomain;
- }
+ ret.crossDomain = headers.getXPermittedCrossDomainPolicies();
// lastModified and etag may be set back to http header. So they can't
// be empty string.
@@ -772,7 +765,9 @@ public final class CacheManager {
}
String etag = headers.getEtag();
- if (etag != null && etag.length() > 0) ret.etag = etag;
+ if (etag != null && etag.length() > 0) {
+ ret.etag = etag;
+ }
String cacheControl = headers.getCacheControl();
if (cacheControl != null) {