diff options
author | John Reck <jreck@google.com> | 2011-04-27 18:22:57 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-04-27 18:22:57 -0700 |
commit | 7fd1e8f86ead29d4cfad3d16e54f4427ac7bf39f (patch) | |
tree | b61025fa4289f8ea95c4d037f99cc2873e751b1b | |
parent | 8541837a164272a07cd4c76016c386e42b07449f (diff) | |
download | packages_apps_browser-7fd1e8f86ead29d4cfad3d16e54f4427ac7bf39f.zip packages_apps_browser-7fd1e8f86ead29d4cfad3d16e54f4427ac7bf39f.tar.gz packages_apps_browser-7fd1e8f86ead29d4cfad3d16e54f4427ac7bf39f.tar.bz2 |
Add Honeycomb-MR1 useragent
Bug: 4347787
Change-Id: Id87528344fecd367381cd546d831eb35f3218f26
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 0c93377..614e37e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -594,6 +594,7 @@ <item>iPhone</item> <item>iPad</item> <item>Froyo-N1</item> + <item>Honeycomb-Xoom</item> </string-array> <!-- Do not tranlsate. Development option --> <string-array name="pref_development_ua_values" translatable="false"> @@ -602,6 +603,7 @@ <item>2</item> <item>3</item> <item>4</item> + <item>5</item> </string-array> <string name="pref_development_error_console" translatable="false">Show JavaScript Console</string> <!-- Settings screen, setting option name --> diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index 5a022ef..e0e7bc4 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -53,9 +53,9 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, PreferenceKeys { // TODO: Do something with this UserAgent stuff - private static final String DESKTOP_USERAGENT = "Mozilla/5.0 (Macintosh; " + - "U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/533.16 (KHTML, " + - "like Gecko) Version/5.0 Safari/533.16"; + private static final String DESKTOP_USERAGENT = "Mozilla/5.0 (X11; " + + "Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) " + + "Chrome/11.0.696.34 Safari/534.24"; private static final String IPHONE_USERAGENT = "Mozilla/5.0 (iPhone; U; " + "CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 " + @@ -69,11 +69,16 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, "Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 " + "(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"; + private static final String HONEYCOMB_USERAGENT = "Mozilla/5.0 (Linux; U; " + + "Android 3.1; en-us; Xoom Build/HMJ25) AppleWebKit/534.13 " + + "(KHTML, like Gecko) Version/4.0 Safari/534.13"; + private static final String USER_AGENTS[] = { null, DESKTOP_USERAGENT, IPHONE_USERAGENT, IPAD_USERAGENT, - FROYO_USERAGENT + FROYO_USERAGENT, + HONEYCOMB_USERAGENT, }; private static BrowserSettings sInstance; |