Merge pull request #3299 from t-nelson/pivos_android_generic_hw_queries
authorTrent Nelson <trent.a.b.nelson@gmail.com>
Tue, 1 Oct 2013 02:03:25 +0000 (19:03 -0700)
committerTrent Nelson <trent.a.b.nelson@gmail.com>
Tue, 1 Oct 2013 02:03:25 +0000 (19:03 -0700)
droid: add generic hardware queries and hook them up to new Build class

xbmc/utils/SystemInfo.cpp
xbmc/utils/SystemInfo.h

index 10d3812..0fde83b 100644 (file)
@@ -47,6 +47,9 @@
 #include "powermanagement/PowerManager.h"
 #include "utils/StringUtils.h"
 #include "utils/XMLUtils.h"
+#if defined(TARGET_ANDROID)
+#include "android/jni/Build.h"
+#endif
 
 /* Target identification */
 #if defined(TARGET_DARWIN)
@@ -364,6 +367,33 @@ CStdString CSysInfo::GetCPUSerial()
   return "Serial: " + g_cpuInfo.getCPUSerial();
 }
 
+CStdString CSysInfo::GetManufacturer()
+{
+  CStdString manufacturer = "";
+#if defined(TARGET_ANDROID)
+  manufacturer = CJNIBuild::MANUFACTURER;
+#endif
+  return manufacturer;
+}
+
+CStdString CSysInfo::GetModel()
+{
+  CStdString model = "";
+#if defined(TARGET_ANDROID)
+  model = CJNIBuild::MODEL;
+#endif
+  return model;
+}
+
+CStdString CSysInfo::GetProduct()
+{
+  CStdString product = "";
+#if defined(TARGET_ANDROID)
+  product = CJNIBuild::PRODUCT;
+#endif
+  return product;
+}
+
 bool CSysInfo::IsAeroDisabled()
 {
 #ifdef TARGET_WINDOWS
index 13e853e..379cd1a 100644 (file)
@@ -127,6 +127,9 @@ public:
   CStdString GetCPUHardware();
   CStdString GetCPURevision();
   CStdString GetCPUSerial();
+  CStdString GetManufacturer();
+  CStdString GetProduct();
+  CStdString GetModel();
   bool GetDiskSpace(const CStdString drive,int& iTotal, int& iTotalFree, int& iTotalUsed, int& iPercentFree, int& iPercentUsed);
   CStdString GetHddSpaceInfo(int& percent, int drive, bool shortText=false);
   CStdString GetHddSpaceInfo(int drive, bool shortText=false);