Skip to content

Commit a393912

Browse files
authored
Merge pull request #2007 from CastagnaIT/jni_fixes
[widevine][android] Fix problem with hardcoded class names on jni objects
2 parents 5e80df4 + 8fc5117 commit a393912

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e489e131705751a713e86799b347dff24463c7b6f36ace986e7c2449f9acb82f
1+
44a65c4f936cfa6b4b0114eee7a809efeb26a3fa442f70e95c998183d252953c
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
libandroidjni https://github.com/xbmc/libandroidjni/archive/8e59504d0b914ad7cb4bed3acfce846aff1c375e.tar.gz
1+
libandroidjni https://github.com/xbmc/libandroidjni/archive/2f8346bbe794cc3bd41b4195a59f0470470aa52e.tar.gz

src/decrypters/widevineandroid/WVDecrypter.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,24 +151,23 @@ bool CWVDecrypterA::Initialize()
151151
return false;
152152
}
153153

154-
//JNIEnv* env = static_cast<JNIEnv*>(m_androidSystem.GetJNIEnv());
154+
LOG::Log(LOGDEBUG, "WVDecrypter JNI, SDK version: %d, Base class name: %s",
155+
m_androidSystem.GetSDKVersion(), m_androidSystem.GetClassName().c_str());
156+
155157
CJNIBase::SetSDKVersion(m_androidSystem.GetSDKVersion());
156-
//CJNIBase::SetBaseClassName(m_androidSystem.GetClassName()); ---> unused
157-
LOG::Log(LOGDEBUG, "WVDecrypter JNI, SDK version: %d", m_androidSystem.GetSDKVersion());
158+
CJNIBase::SetBaseClassName(m_androidSystem.GetClassName());
158159

159-
const char* apkEnv = getenv("XBMC_ANDROID_APK");
160-
if (!apkEnv)
161-
apkEnv = getenv("KODI_ANDROID_APK");
160+
const char* apkPath = getenv("XBMC_ANDROID_APK");
161+
if (!apkPath)
162+
apkPath = getenv("KODI_ANDROID_APK");
162163

163-
if (!apkEnv)
164+
if (!apkPath)
164165
{
165166
LOG::LogF(LOGERROR, "Cannot get enviroment XBMC_ANDROID_APK/KODI_ANDROID_APK value");
166167
return false;
167168
}
168169

169-
std::string apkPath = apkEnv;
170-
171-
m_classLoader = std::make_shared<CJNIClassLoader>(apkEnv);
170+
m_classLoader = std::make_shared<CJNIClassLoader>(apkPath);
172171
if (xbmc_jnienv()->ExceptionCheck())
173172
{
174173
LOG::LogF(LOGERROR, "Failed to create ClassLoader");

0 commit comments

Comments
 (0)