зеркало из https://github.com/mozilla/pjs.git
Bug 613321. Backing out bug 604712 (rev 6cfd43067a07) to fix hang on Galaxy S phones. a=blocking-fennec
This commit is contained in:
Родитель
45d7a65f6a
Коммит
a693e7cf5a
|
@ -96,7 +96,7 @@ nsSystemInfo::Init()
|
|||
// This must be done here because NSPR can only separate OS's when compiled, not libraries.
|
||||
char* gtkver = PR_smprintf("GTK %u.%u.%u", gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
if (gtkver) {
|
||||
rv = SetPropertyAsACString(NS_LITERAL_STRING("secondaryLibrary"),
|
||||
rv = SetPropertyAsACString(NS_ConvertASCIItoUTF16("secondaryLibrary"),
|
||||
nsDependentCString(gtkver));
|
||||
PR_smprintf_free(gtkver);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -113,17 +113,12 @@ nsSystemInfo::Init()
|
|||
while ((read = getline(&line, &len, fp)) != -1) {
|
||||
if (line) {
|
||||
if (strstr(line, "RX-51")) {
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("device"), NS_LITERAL_CSTRING("Nokia N900"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("manufacturer"), NS_LITERAL_CSTRING("Nokia"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("hardware"), NS_LITERAL_CSTRING("RX-51"));
|
||||
SetPropertyAsACString(NS_ConvertASCIItoUTF16("device"), NS_LITERAL_CSTRING("Nokia N900"));
|
||||
break;
|
||||
} else if (strstr(line, "RX-44") ||
|
||||
strstr(line, "RX-48") ||
|
||||
strstr(line, "RX-32") ) {
|
||||
/* not as accurate as we can be, but these devices are deprecated */
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("device"), NS_LITERAL_CSTRING("Nokia N8xx"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("manufacturer"), NS_LITERAL_CSTRING("Nokia"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("hardware"), NS_LITERAL_CSTRING("N8xx"));
|
||||
SetPropertyAsACString(NS_ConvertASCIItoUTF16("device"), NS_LITERAL_CSTRING("Nokia N8xx"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -139,10 +134,6 @@ nsSystemInfo::Init()
|
|||
nsAutoString str;
|
||||
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "MODEL", str))
|
||||
SetPropertyAsAString(NS_LITERAL_STRING("device"), str);
|
||||
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "MANUFACTURER", str))
|
||||
SetPropertyAsAString(NS_LITERAL_STRING("manufacturer"), str);
|
||||
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", str))
|
||||
SetPropertyAsAString(NS_LITERAL_STRING("hardware"), str);
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче