1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Specify a particular mime type. Although the K-9 settings file mime

type will not be generally known, specifying something in particular
means that only file browsers that can handle */* will used as options
in the chooser.  In my tests, OI File Manager responds immediately (and
the chooser is bypassed) and the camera, music and ringtone selectors
are not provided as options.
This commit is contained in:
danapple 2011-03-23 00:00:24 -05:00
parent 0a0cfac1cb
commit fd468e95fb

View File

@ -832,7 +832,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
private void onImport() { private void onImport() {
Intent i = new Intent(Intent.ACTION_GET_CONTENT); Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addCategory(Intent.CATEGORY_OPENABLE); i.addCategory(Intent.CATEGORY_OPENABLE);
i.setType("*/*"); i.setType(MimeUtility.K9_SETTINGS_MIME_TYPE);
startActivityForResult(Intent.createChooser(i, null), ACTIVITY_REQUEST_PICK_SETTINGS_FILE); startActivityForResult(Intent.createChooser(i, null), ACTIVITY_REQUEST_PICK_SETTINGS_FILE);
} }