From 6d649d8bcf9e89cd48a9f21d8bd3a5305ec26063 Mon Sep 17 00:00:00 2001 From: Mark Finkle Date: Thu, 5 May 2011 16:50:19 -0400 Subject: [PATCH] Bug 650390 - osversion in chrome.manifest files should query android os version [r=dtownsend] --- xpcom/components/ManifestParser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp index 372c01d2cbc..adc26398785 100644 --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp @@ -49,6 +49,10 @@ #include #endif +#ifdef ANDROID +#include "AndroidBridge.h" +#endif + #include "mozilla/Services.h" #include "nsConsoleMessage.h" @@ -485,6 +489,10 @@ ParseManifestCommon(NSLocationType aType, nsILocalFile* aFile, nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), gtk_major_version, gtk_minor_version); +#elif defined(ANDROID) + if (mozilla::AndroidBridge::Bridge()) { + mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion); + } #endif // Because contracts must be registered after CIDs, we save and process them