Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[droid] make GetIconSize() usage more clear

  • Loading branch information...
commit a869c7927b51df754071b22f1d1633045f72d57c 1 parent d813bcf
Cory Fields authored
View
6 xbmc/android/activity/XBMCApp.cpp
@@ -519,7 +519,7 @@ bool CXBMCApp::ListApplications(vector<androidPackage> *applications)
return true;
}
-bool CXBMCApp::GetIconSize(const string &packageName, int &width, int &height)
+bool CXBMCApp::GetIconSize(const string &packageName, int *width, int *height)
{
if (!m_activity)
return false;
@@ -571,7 +571,7 @@ bool CXBMCApp::GetIconSize(const string &packageName, int &width, int &height)
env->DeleteLocalRef(cBitmap);
// width = oBitmap.getWidth;
- width = (int)env->CallIntMethod(oBitmap, mgetWidth);
+ *width = (int)env->CallIntMethod(oBitmap, mgetWidth);
exc = env->ExceptionOccurred();
if (exc)
@@ -584,7 +584,7 @@ bool CXBMCApp::GetIconSize(const string &packageName, int &width, int &height)
return false;
}
// height = oBitmap.getHeight;
- height = (int)env->CallIntMethod(oBitmap, mgetHeight);
+ *height = (int)env->CallIntMethod(oBitmap, mgetHeight);
env->DeleteLocalRef(oBitmap);
exc = env->ExceptionOccurred();
View
2  xbmc/android/activity/XBMCApp.h
@@ -85,7 +85,7 @@ class CXBMCApp : public IActivityHandler
static int GetBatteryLevel();
static bool StartActivity(const std::string &package);
static bool ListApplications(std::vector <androidPackage> *applications);
- static bool GetIconSize(const std::string &packageName, int &width, int &height);
+ static bool GetIconSize(const std::string &packageName, int *width, int *height);
static bool GetIcon(const std::string &packageName, void* buffer, unsigned int bufSize);
/*!
* \brief If external storage is available, it returns the path for the external storage (for the specified type)
View
2  xbmc/filesystem/AndroidAppFile.cpp
@@ -71,7 +71,7 @@ void CFileAndroidApp::Close()
int64_t CFileAndroidApp::GetLength()
{
- CXBMCApp::GetIconSize(m_appname, m_iconWidth, m_iconHeight);
+ CXBMCApp::GetIconSize(m_appname, &m_iconWidth, &m_iconHeight);
return m_iconWidth * m_iconHeight * 4;
}
Please sign in to comment.
Something went wrong with that request. Please try again.