[android] fixed build and runtime issues

* fixed a return value bug in event handling
* fixed some android manifest issues with newer API
* fixed version parser in java to properly load libraries
This commit is contained in:
Armin Novak 2023-03-22 20:31:32 +01:00 committed by Martin Fleisz
parent 9515babd69
commit 19297707e0
6 changed files with 13 additions and 13 deletions

View File

@ -10,8 +10,6 @@
android:label="aFreeRDP"
android:resizeableActivity="true">
<!-- Main activity -->
<activity
android:exported="true"
@ -86,6 +84,7 @@
</activity>
<activity-alias
android:exported="true"
android:name=".services.SessionRequestHandlerActivity"
android:targetActivity="com.freerdp.freerdpcore.services.SessionRequestHandlerActivity">
<intent-filter>

View File

@ -62,11 +62,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
ndkVersion '23.1.7779620'
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.18.1'
}
}
}

View File

@ -18,7 +18,10 @@
android:smallScreens="true"
android:xlargeScreens="true" />
<application android:theme="@style/Theme.Main" android:resizeableActivity="true" >
<application
android:theme="@style/Theme.Main"
android:resizeableActivity="true"
>
<meta-data android:name="com.samsung.android.keepalive.density" android:value="true"/>
<!-- Activity to create shortcuts -->
<activity
@ -37,6 +40,7 @@
<!-- intent-filter. This gives you a way to set the text (and optionally the -->
<!-- icon) that will be seen in the launcher's create-shortcut user interface. -->
<activity-alias
android:exported="true"
android:name=".presentation.CreateShortcuts"
android:label="@string/title_create_shortcut"
android:targetActivity=".presentation.ShortcutsActivity">

View File

@ -132,7 +132,7 @@ static BOOL android_process_event(ANDROID_EVENT_QUEUE* queue, freerdp* inst)
else
ClipboardEmpty(afc->clipboard);
android_cliprdr_send_client_format_list(afc->cliprdr);
rc = (android_cliprdr_send_client_format_list(afc->cliprdr) == CHANNEL_RC_OK);
}
break;

View File

@ -81,7 +81,7 @@ public class LibFreeRDP
/* Load dependent libraries too to trigger JNI_OnLoad calls */
String version = freerdp_get_jni_version();
String[] versions = version.split(".");
String[] versions = version.split("[\\.-]");
if (versions.length > 0)
{
System.loadLibrary("freerdp-client" + versions[0]);
@ -290,13 +290,13 @@ public class LibFreeRDP
switch (advanced.getSecurity())
{
case 3: // NLA
args.add("/sec-nla");
args.add("/sec:nla");
break;
case 2: // TLS
args.add("/sec-tls");
args.add("/sec:tls");
break;
case 1: // RDP
args.add("/sec-rdp");
args.add("/sec:rdp");
break;
default:
break;
@ -329,7 +329,6 @@ public class LibFreeRDP
args.add(addFlag("themes", flags.getTheming()));
args.add(addFlag("fonts", flags.getFontSmoothing()));
args.add(addFlag("aero", flags.getDesktopComposition()));
args.add(addFlag("glyph-cache", false));
if (!advanced.getRemoteProgram().isEmpty())
{
@ -392,7 +391,7 @@ public class LibFreeRDP
args.add("/microphone");
}
args.add("/cert-ignore");
args.add("/cert:ignore");
args.add("/log-level:" + debug.getDebugLevel());
String[] arrayArgs = args.toArray(new String[0]);
return freerdp_parse_arguments(inst, arrayArgs);