Workaround text/xml not handled correctly on some devices

http://forum.xda-developers.com/showpost.php?p=65045187&postcount=1074
This commit is contained in:
M66B 2016-01-29 19:01:04 +01:00
parent 245afe91ea
commit fc936bc546
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}