Commit 08af1639 authored by Volker Krause's avatar Volker Krause
Browse files

Remove DAVx legacy support

This removes support for DAVx's pre-2019 format for custom iCal properties,
which allows us to drop the entire set of iCal4j dependencies.
parent 2e1ddabb
......@@ -71,14 +71,6 @@ Kirigami.Page {
licenseName: "GNU General Public License v2 or Freetype Project License"
url: "https://www.freetype.org/"
}
ListElement {
name: "iCal4j"
copyright: "© 2012, Ben Fortuna"
platform: "android"
licenseId: "BSD-3-Clause"
licenseName: "BSD 3-Clause License"
url: "https://github.com/ical4j/ical4j"
}
ListElement {
name: "libintl lite"
platform: "android"
......
......@@ -26,7 +26,6 @@ apply plugin: 'com.android.application'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'org.mnode.ical4j:ical4j:2.2.0'
implementation 'androidx.core:core:1.3.1'
}
......
......@@ -8,8 +8,6 @@ package org.kde.itinerary;
import org.qtproject.qt5.android.bindings.QtActivity;
import net.fortuna.ical4j.model.property.XProperty;
import androidx.core.content.FileProvider;
import android.content.Intent;
......@@ -27,7 +25,6 @@ public class Activity extends QtActivity
{
private static final String TAG = "org.kde.itinerary";
public native void importReservation(String data);
public native void importDavDroidJson(String data);
public native void importFromIntent(Intent data);
......@@ -66,19 +63,6 @@ public class Activity extends QtActivity
Log.i(TAG, propName);
if (propName.equals("unknown-property.v2") || propName.contains("vnd.ical4android.unknown-property")) {
importDavDroidJson(propValue);
// legacy, replaced by the above in Feb 2019, removing this eventually will allow us to remove the ical4j dependency
} else if (propName.equals("unknown-property")) {
ByteArrayInputStream bis = new ByteArrayInputStream(android.util.Base64.decode(propValue, android.util.Base64.NO_WRAP));
try {
ObjectInputStream ois = new ObjectInputStream(bis);
Object prop = ois.readObject();
if (prop instanceof XProperty) {
importReservation(((XProperty) prop).getValue());
}
} catch (Exception e) {
Log.i(TAG, e.toString());
}
}
}
}
......
......@@ -64,14 +64,6 @@ using namespace KItinerary;
#ifdef Q_OS_ANDROID
static void importReservation(JNIEnv *env, jobject that, jstring data)
{
Q_UNUSED(that)
const char *str = env->GetStringUTFChars(data, nullptr);
ApplicationController::instance()->importData(str);
env->ReleaseStringUTFChars(data, str);
}
static void importDavDroidJson(JNIEnv *env, jobject that, jstring data)
{
Q_UNUSED(that)
......@@ -99,7 +91,6 @@ static void importFromIntent(JNIEnv *env, jobject that, jobject data)
}
static const JNINativeMethod methods[] = {
{"importReservation", "(Ljava/lang/String;)V", (void*)importReservation},
{"importFromIntent", "(Landroid/content/Intent;)V", (void*)importFromIntent},
{"importDavDroidJson", "(Ljava/lang/String;)V", (void*)importDavDroidJson}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment