1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -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
parent 9fe71bca2d
commit b398c4d7f4

View File

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