mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1001542 - Make OS_VERSION use b2g version info rather than Linux version info.
This commit is contained in:
parent
e8f6f98c2b
commit
29347f4490
@ -822,6 +822,7 @@ pref("general.useragent.updates.retry", 86400); // 1 day
|
||||
pref("media.useAudioChannelService", true);
|
||||
|
||||
pref("b2g.version", @MOZ_B2G_VERSION@);
|
||||
pref("b2g.osName", @MOZ_B2G_OS_NAME@);
|
||||
|
||||
// Disable console buffering to save memory.
|
||||
pref("consoleservice.buffered", false);
|
||||
|
@ -32,6 +32,7 @@ using namespace mozilla::widget::android;
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include <sys/system_properties.h>
|
||||
#include "mozilla/Preferences.h"
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
@ -288,13 +289,35 @@ nsSystemInfo::Init()
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
char sdk[PROP_VALUE_MAX], characteristics[PROP_VALUE_MAX];
|
||||
if (__system_property_get("ro.build.version.sdk", sdk))
|
||||
char sdk[PROP_VALUE_MAX];
|
||||
if (__system_property_get("ro.build.version.sdk", sdk)) {
|
||||
android_sdk_version = atoi(sdk);
|
||||
SetPropertyAsInt32(NS_LITERAL_STRING("sdk_version"), android_sdk_version);
|
||||
}
|
||||
|
||||
char characteristics[PROP_VALUE_MAX];
|
||||
if (__system_property_get("ro.build.characteristics", characteristics)) {
|
||||
if (!strcmp(characteristics, "tablet"))
|
||||
SetPropertyAsBool(NS_LITERAL_STRING("tablet"), true);
|
||||
}
|
||||
|
||||
nsAutoString str;
|
||||
rv = GetPropertyAsAString(NS_LITERAL_STRING("version"), str);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
SetPropertyAsAString(NS_LITERAL_STRING("kernel_version"), str);
|
||||
}
|
||||
|
||||
const nsAdoptingString& b2g_os_name =
|
||||
mozilla::Preferences::GetString("b2g.osName");
|
||||
if (b2g_os_name) {
|
||||
SetPropertyAsAString(NS_LITERAL_STRING("name"), b2g_os_name);
|
||||
}
|
||||
|
||||
const nsAdoptingString& b2g_version =
|
||||
mozilla::Preferences::GetString("b2g.version");
|
||||
if (b2g_version) {
|
||||
SetPropertyAsAString(NS_LITERAL_STRING("version"), b2g_version);
|
||||
}
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user