Bug 619578. Add Android HW info to GfxInfo. r=vlad,a=blocking-fennec

--HG--
extra : rebase_source : b5a08089a29f8df06494803d06eade5224b8f6a0
This commit is contained in:
Jeff Muizelaar 2011-01-05 23:54:32 -05:00
parent fbaf7d1423
commit 3cdeccbf53

View File

@ -42,6 +42,8 @@
#include "prprf.h"
#include "EGLUtils.h"
#include "AndroidBridge.h"
#if defined(MOZ_CRASHREPORTER) && defined(MOZ_ENABLE_LIBXUL)
#include "nsExceptionHandler.h"
#include "nsICrashReporter.h"
@ -80,6 +82,19 @@ NS_IMETHODIMP
GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription)
{
aAdapterDescription.AssignASCII(mozilla::gl::GetVendor());
if (mozilla::AndroidBridge::Bridge()) {
nsAutoString str;
aAdapterDescription.Append(NS_LITERAL_STRING(" "));
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "MODEL", str))
aAdapterDescription.Append(str);
aAdapterDescription.Append(NS_LITERAL_STRING(" "));
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "MANUFACTURER", str))
aAdapterDescription.Append(str);
aAdapterDescription.Append(NS_LITERAL_STRING(" "));
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", str))
aAdapterDescription.Append(str);
}
return NS_OK;
}