Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
[droid] add android platform to GUIInfoManager
Browse files Browse the repository at this point in the history
  • Loading branch information
Cory Fields committed Aug 3, 2012
1 parent 890a406 commit ed3ff09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion xbmc/GUIInfoManager.cpp
Expand Up @@ -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...
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1913,6 +1914,12 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
bReturn = true;
#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();
Expand Down
1 change: 1 addition & 0 deletions xbmc/GUIInfoManager.h
Expand Up @@ -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
Expand Down

0 comments on commit ed3ff09

Please sign in to comment.