From bb1f79b5e642b55101699ede93ea7c447ef92b94 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 7 Jan 2020 19:09:56 +0000 Subject: [PATCH] Open .itinerary files always in KDE Itinerary --- .../Plugins/SharePlugin/CompositeReceiveFileJob.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/kde/kdeconnect/Plugins/SharePlugin/CompositeReceiveFileJob.java b/src/org/kde/kdeconnect/Plugins/SharePlugin/CompositeReceiveFileJob.java index 394dfbe2..b264470e 100644 --- a/src/org/kde/kdeconnect/Plugins/SharePlugin/CompositeReceiveFileJob.java +++ b/src/org/kde/kdeconnect/Plugins/SharePlugin/CompositeReceiveFileJob.java @@ -352,6 +352,11 @@ public class CompositeReceiveFileJob extends BackgroundJob { intent.setDataAndType(fileDocument.getUri(), mimeType); } + // Open files for KDE Itinerary explicitly because Android's activity resolution sucks + if (fileDocument.getName().endsWith(".itinerary")) { + intent.setClassName("org.kde.itinerary", "org.kde.itinerary.Activity"); + } + getDevice().getContext().startActivity(intent); } }