We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 034b8c8 commit 92ee8f4Copy full SHA for 92ee8f4
src/itkach/aard2/DictionariesFragment.java
@@ -102,9 +102,10 @@ private void selectDictionaryFiles() {
102
intent.setAction(Intent.ACTION_OPEN_DOCUMENT);
103
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
104
intent.setType("*/*");
105
- Intent chooser = Intent.createChooser(intent, getResources().getString(R.string.title_activity_file_select));
+ intent.addCategory(Intent.CATEGORY_OPENABLE);
106
+ intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
107
try {
- startActivityForResult(chooser, FILE_SELECT_REQUEST);
108
+ startActivityForResult(intent, FILE_SELECT_REQUEST);
109
}
110
catch (ActivityNotFoundException e){
111
Log.d(TAG, "Not activity to get content", e);
0 commit comments