Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d62775b3 authored by Michael Kolb's avatar Michael Kolb Committed by Android (Google) Code Review
Browse files

Merge "user agent string change: remove "Mobile" for large screen configuration"

parents b6643d90 a172e7d0
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
@@ -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;
@@ -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);
    }

    /**
@@ -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);
    }
@@ -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;
    }
+2 −2
Original line number Diff line number Diff line
@@ -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>