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

Commit 4a74eb67 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE Use previous version if version is a codename" into honeycomb-mr2

parents 40277df7 3e1aecea
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package android.webkit;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
@@ -139,6 +138,9 @@ public class WebSettings {
        OFF
    }

    // TODO: Keep this up to date
    private static final String PREVIOUS_VERSION = "3.1";

    // WebView associated with this WebSettings.
    private WebView mWebView;
    // BrowserFrame used to access the native frame pointer.
@@ -471,7 +473,14 @@ public class WebSettings {
        // Add version
        final String version = Build.VERSION.RELEASE;
        if (version.length() > 0) {
            if (Character.isDigit(version.charAt(0))) {
                // Release is a version, eg "3.1"
                buffer.append(version);
            } else {
                // Release is a codename, eg "Honeycomb"
                // In this case, use the previous release's version
                buffer.append(PREVIOUS_VERSION);
            }
        } else {
            // default to "1.0"
            buffer.append("1.0");