diff options
author | Michael Kolb <kolby@google.com> | 2010-07-28 11:06:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-28 11:06:50 -0700 |
commit | 48a16ce36ecd30e9a786a6318a811436e5fa5427 (patch) | |
tree | a39c29b4d4581486fc76181e0e0caaa7ba60294b /core | |
parent | 17350886d03ace01de437eacee1e11e4e997f9cb (diff) | |
parent | 37b64de6bcd0013856954c5f9c847feb81618f7f (diff) | |
download | frameworks_base-48a16ce36ecd30e9a786a6318a811436e5fa5427.zip frameworks_base-48a16ce36ecd30e9a786a6318a811436e5fa5427.tar.gz frameworks_base-48a16ce36ecd30e9a786a6318a811436e5fa5427.tar.bz2 |
Merge "moved target_content user agent parameter to strings added target content parameter for xlarge screen configuration"
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/webkit/WebSettings.java | 8 | ||||
-rw-r--r-- | core/res/res/values-xlarge/strings.xml | 25 | ||||
-rw-r--r-- | core/res/res/values/strings.xml | 4 |
3 files changed, 31 insertions, 6 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 52e992b..681ef70 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -19,12 +19,11 @@ package android.webkit; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageManager; -import android.content.res.Configuration; import android.os.Build; import android.os.Handler; import android.os.Message; import android.util.EventLog; -import java.lang.SecurityException; + import java.util.Locale; /** @@ -433,9 +432,8 @@ public class WebSettings { buffer.append(" Build/"); buffer.append(id); } - String mobile = ((mContext.getResources().getConfiguration().screenLayout - & Configuration.SCREENLAYOUT_SIZE_MASK) - == Configuration.SCREENLAYOUT_SIZE_XLARGE) ? "" : "Mobile "; + String mobile = mContext.getResources().getText( + com.android.internal.R.string.web_user_agent_target_content).toString(); final String base = mContext.getResources().getText( com.android.internal.R.string.web_user_agent).toString(); return String.format(base, buffer, mobile); diff --git a/core/res/res/values-xlarge/strings.xml b/core/res/res/values-xlarge/strings.xml new file mode 100644 index 0000000..fc20be6 --- /dev/null +++ b/core/res/res/values-xlarge/strings.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/strings.xml +** +** Copyright 2010, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Do not translate. WebView User Agent targeted content --> + <string name="web_user_agent_target_content" translatable="false"></string> + +</resources>
\ No newline at end of file diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 7a80884..04a8b04 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1605,7 +1605,9 @@ <!-- Do not translate. WebView User Agent string --> <string name="web_user_agent" translatable="false">Mozilla/5.0 (Linux; U; <xliff:g id="x">Android %s</xliff:g>) - AppleWebKit/534.3 (KHTML, like Gecko) Version/4.0 <xliff:g id="mobile">%s</xliff:g>Safari/534.3</string> + AppleWebKit/534.1 (KHTML, like Gecko) Version/4.0 <xliff:g id="mobile">%s</xliff:g>Safari/534.1</string> + <!-- Do not translate. WebView User Agent targeted content --> + <string name="web_user_agent_target_content" translatable="false">"Mobile "</string> <!-- Title for a JavaScript dialog. "The page at <url of current page> says:" --> <string name="js_dialog_title">The page at \'<xliff:g id="title">%s</xliff:g>\' says:</string> |