1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-14 21:45:14 -05: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 committed by Jesse Vincent
parent d97176e6c7
commit ed3a160403

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);