1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Fix file selection for import

Using FLAG_ACTIVITY_NO_HISTORY will cause the file selection
to fail when KitKat's "Open from" activity opens a third-party activity.
This commit is contained in:
cketti 2013-11-07 07:33:33 +01:00
parent 9fe71bca2d
commit b398c4d7f4

View File

@ -1371,10 +1371,8 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
private void onImport() {
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
i.addCategory(Intent.CATEGORY_OPENABLE);
i.setType("*/*"); // KitKat seems to be ignoring mimetypes and won't load settings
// MimeUtility.K9_SETTINGS_MIME_TYPE);
i.setType("*/*");
PackageManager packageManager = getPackageManager();
List<ResolveInfo> infos = packageManager.queryIntentActivities(i, 0);