am 82de141d: am 4a74eb67: Merge "DO NOT MERGE Use previous version if version is a codename" into honeycomb-mr2
* commit '82de141db736b95b0e388ff060e2d2535192d769': DO NOT MERGE Use previous version if version is a codename
This commit is contained in:
@@ -19,7 +19,6 @@ package android.webkit;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Resources;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
@@ -139,6 +138,9 @@ public class WebSettings {
|
|||||||
OFF
|
OFF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Keep this up to date
|
||||||
|
private static final String PREVIOUS_VERSION = "3.1";
|
||||||
|
|
||||||
// WebView associated with this WebSettings.
|
// WebView associated with this WebSettings.
|
||||||
private WebView mWebView;
|
private WebView mWebView;
|
||||||
// BrowserFrame used to access the native frame pointer.
|
// BrowserFrame used to access the native frame pointer.
|
||||||
@@ -471,7 +473,14 @@ public class WebSettings {
|
|||||||
// Add version
|
// Add version
|
||||||
final String version = Build.VERSION.RELEASE;
|
final String version = Build.VERSION.RELEASE;
|
||||||
if (version.length() > 0) {
|
if (version.length() > 0) {
|
||||||
|
if (Character.isDigit(version.charAt(0))) {
|
||||||
|
// Release is a version, eg "3.1"
|
||||||
buffer.append(version);
|
buffer.append(version);
|
||||||
|
} else {
|
||||||
|
// Release is a codename, eg "Honeycomb"
|
||||||
|
// In this case, use the previous release's version
|
||||||
|
buffer.append(PREVIOUS_VERSION);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// default to "1.0"
|
// default to "1.0"
|
||||||
buffer.append("1.0");
|
buffer.append("1.0");
|
||||||
|
|||||||
Reference in New Issue
Block a user