mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[winpr,android] Unify JNI_OnLoad
* Split JNI_OnLoad and JNI_OnUnload to own module to be usable from more
than only timezone
* Explicitly call System.loadLibrary('winpr') (and other FreeRDP
libraries) in android client as JNI_OnLoad is only triggered by that
and not implicit loading
This commit is contained in:
@@ -78,7 +78,16 @@ public class LibFreeRDP
|
||||
try
|
||||
{
|
||||
System.loadLibrary("freerdp-android");
|
||||
|
||||
/* Load dependent libraries too to trigger JNI_OnLoad calls */
|
||||
String version = freerdp_get_jni_version();
|
||||
String[] versions = version.split(".");
|
||||
if (versions.length > 0)
|
||||
{
|
||||
System.loadLibrary("freerdp-client" + versions[0]);
|
||||
System.loadLibrary("freerdp" + versions[0]);
|
||||
System.loadLibrary("winpr" + versions[0]);
|
||||
}
|
||||
Pattern pattern = Pattern.compile("^(\\d+)\\.(\\d+)\\.(\\d+).*");
|
||||
Matcher matcher = pattern.matcher(version);
|
||||
if (!matcher.matches() || (matcher.groupCount() < 3))
|
||||
|
||||
Reference in New Issue
Block a user