From fc936bc5463f9010640ff8ffead062cad649e689 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 29 Jan 2016 19:01:04 +0100 Subject: [PATCH] Workaround text/xml not handled correctly on some devices http://forum.xda-developers.com/showpost.php?p=65045187&postcount=1074 --- .../main/java/eu/faircode/netguard/ActivitySettings.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 6649ea0b..a2c6f80d 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -607,7 +607,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere private static Intent getIntentCreateExport() { Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); - intent.setType("text/xml"); + intent.setType("*/*"); // text/xml intent.putExtra(Intent.EXTRA_TITLE, "netguard_" + new SimpleDateFormat("yyyyMMdd").format(new Date().getTime()) + ".xml"); return intent; } @@ -615,14 +615,14 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere private static Intent getIntentOpenExport() { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); - intent.setType("text/xml"); + intent.setType("*/*"); // text/xml return intent; } private static Intent getIntentOpenHosts() { Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); - intent.setType("*/*"); + intent.setType("*/*"); // text/plain return intent; }