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

* commit '4a74eb679917797bf77a20773e0c079f5cc808e4':
  DO NOT MERGE Use previous version if version is a codename
This commit is contained in:
John Reck
2011-05-23 16:50:23 -07:00
committed by Android Git Automerger

View File

@@ -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) {
buffer.append(version);
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");