Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[droid] add android platform to GUIInfoManager

  • Loading branch information...
commit ed3ff09a17194ad628126f9d3fa75bdda2c37651 1 parent 890a406
Cory Fields authored
Showing with 9 additions and 1 deletion.
  1. +8 −1 xbmc/GUIInfoManager.cpp
  2. +1 −0  xbmc/GUIInfoManager.h
View
9 xbmc/GUIInfoManager.cpp
@@ -1022,6 +1022,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
else if (platform == "osx") return SYSTEM_PLATFORM_DARWIN_OSX;
else if (platform == "ios") return SYSTEM_PLATFORM_DARWIN_IOS;
else if (platform == "atv2") return SYSTEM_PLATFORM_DARWIN_ATV2;
+ else if (platform == "android") return SYSTEM_PLATFORM_ANDROID;
}
if (info[0].name == "musicplayer")
{ // TODO: these two don't allow duration(foo) and also don't allow more than this number of levels...
@@ -1879,7 +1880,7 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
bReturn = g_application.IsMusicScanning();
}
else if (condition == SYSTEM_PLATFORM_LINUX)
-#if defined(_LINUX) && !defined(TARGET_DARWIN)
+#if defined(_LINUX) && !defined(TARGET_DARWIN) && !defined(TARGET_ANDROID)
bReturn = true;
#else
bReturn = false;
@@ -1914,6 +1915,12 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
#else
bReturn = false;
#endif
+ else if (condition == SYSTEM_PLATFORM_ANDROID)
+#if defined(TARGET_ANDROID)
+ bReturn = true;
+#else
+ bReturn = false;
+#endif
else if (condition == SYSTEM_MEDIA_DVD)
bReturn = g_mediaManager.IsDiscInDrive();
#ifdef HAS_DVD_DRIVE
View
1  xbmc/GUIInfoManager.h
@@ -391,6 +391,7 @@ namespace INFO
#define SYSTEM_PLATFORM_DARWIN_OSX 744
#define SYSTEM_PLATFORM_DARWIN_IOS 745
#define SYSTEM_PLATFORM_DARWIN_ATV2 746
+#define SYSTEM_PLATFORM_ANDROID 747
#define SYSTEM_CAN_POWERDOWN 750
#define SYSTEM_CAN_SUSPEND 751
Please sign in to comment.
Something went wrong with that request. Please try again.