summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-01-27 14:53:51 -0800
committerGrace Kloba <klobag@google.com>2010-01-28 09:21:11 -0800
commit00f54c589fd38431efd42ea2a551a49e64d595d5 (patch)
treea13bde5173454e612d01a3194120e7127c83aa6d /src/com/android
parent068e48b469f5abca53ee3da38f933cf2c25c93b8 (diff)
downloadpackages_apps_Browser-00f54c589fd38431efd42ea2a551a49e64d595d5.zip
packages_apps_Browser-00f54c589fd38431efd42ea2a551a49e64d595d5.tar.gz
packages_apps_Browser-00f54c589fd38431efd42ea2a551a49e64d595d5.tar.bz2
Use a single EXTRA_HEADERS intent.
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/browser/BrowserActivity.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 451b3b2..2f1c3df 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -123,6 +123,7 @@ import java.net.URLEncoder;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -635,15 +636,14 @@ public class BrowserActivity extends Activity
}
}
if (url != null && url.startsWith("http")) {
- String[] keys = intent
- .getStringArrayExtra(Browser.EXTRA_HEADERS_KEY);
- String[] values = intent
- .getStringArrayExtra(Browser.EXTRA_HEADERS_VALUE);
- if (keys != null && values != null && keys.length > 0
- && keys.length == values.length) {
+ final Bundle pairs = intent
+ .getBundleExtra(Browser.EXTRA_HEADERS);
+ if (!pairs.isEmpty()) {
+ Iterator<String> iter = pairs.keySet().iterator();
headers = new HashMap<String, String>();
- for (int i = 0; i < keys.length; i++) {
- headers.put(keys[i], values[i]);
+ while (iter.hasNext()) {
+ String key = iter.next();
+ headers.put(key, pairs.getString(key));
}
}
}