Loading core/java/android/webkit/WebSettings.java +19 −13 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ 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; Loading Loading @@ -432,9 +433,12 @@ public class WebSettings { buffer.append(" Build/"); buffer.append(id); } String mobile = ((mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE) ? "" : "Mobile "; final String base = mContext.getResources().getText( com.android.internal.R.string.web_user_agent).toString(); return String.format(base, buffer); return String.format(base, buffer, mobile); } /** Loading Loading @@ -1071,6 +1075,7 @@ public class WebSettings { * @deprecated This method has been deprecated in favor of * {@link #setPluginState} */ @Deprecated public synchronized void setPluginsEnabled(boolean flag) { setPluginState(PluginState.ON); } Loading Loading @@ -1260,6 +1265,7 @@ public class WebSettings { * @return True if plugins are enabled. * @deprecated This method has been replaced by {@link #getPluginState} */ @Deprecated public synchronized boolean getPluginsEnabled() { return mPluginState == PluginState.ON; } Loading core/res/res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -1604,8 +1604,8 @@ <string name="factorytest_reboot">Reboot</string> <!-- Do not translate. WebView User Agent string --> <string name="web_user_agent" translatable="false"><xliff:g id="x">Mozilla/5.0 (Linux; U; Android %s) AppleWebKit/534.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.1</xliff:g></string> <string name="web_user_agent" translatable="false">Mozilla/5.0 (Linux; U; <xliff:g id="x">Android %s</xliff:g>) AppleWebKit/534.1 (KHTML, like Gecko) Version/4.0 <xliff:g id="mobile">%s</xliff:g>Safari/534.1</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> Loading Loading
core/java/android/webkit/WebSettings.java +19 −13 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ 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; Loading Loading @@ -432,9 +433,12 @@ public class WebSettings { buffer.append(" Build/"); buffer.append(id); } String mobile = ((mContext.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE) ? "" : "Mobile "; final String base = mContext.getResources().getText( com.android.internal.R.string.web_user_agent).toString(); return String.format(base, buffer); return String.format(base, buffer, mobile); } /** Loading Loading @@ -1071,6 +1075,7 @@ public class WebSettings { * @deprecated This method has been deprecated in favor of * {@link #setPluginState} */ @Deprecated public synchronized void setPluginsEnabled(boolean flag) { setPluginState(PluginState.ON); } Loading Loading @@ -1260,6 +1265,7 @@ public class WebSettings { * @return True if plugins are enabled. * @deprecated This method has been replaced by {@link #getPluginState} */ @Deprecated public synchronized boolean getPluginsEnabled() { return mPluginState == PluginState.ON; } Loading
core/res/res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -1604,8 +1604,8 @@ <string name="factorytest_reboot">Reboot</string> <!-- Do not translate. WebView User Agent string --> <string name="web_user_agent" translatable="false"><xliff:g id="x">Mozilla/5.0 (Linux; U; Android %s) AppleWebKit/534.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.1</xliff:g></string> <string name="web_user_agent" translatable="false">Mozilla/5.0 (Linux; U; <xliff:g id="x">Android %s</xliff:g>) AppleWebKit/534.1 (KHTML, like Gecko) Version/4.0 <xliff:g id="mobile">%s</xliff:g>Safari/534.1</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> Loading