Update FileBrowserActivity.java
This commit is contained in:
parent
5f35774a62
commit
0e9a2f9f55
|
@ -169,9 +169,14 @@ public class FileBrowserActivity extends FCLActivity implements View.OnClickList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (view == openExternal) {
|
if (view == openExternal) {
|
||||||
|
if (currentPath.toFile().getAbsolutePath().equals(Environment.getExternalStorageDirectory().getAbsolutePath())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Uri uri = FileProvider.getUriForFile(this, getString(R.string.file_browser_provider), currentPath.toFile());
|
Uri uri = FileProvider.getUriForFile(this, getString(R.string.file_browser_provider), currentPath.toFile());
|
||||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||||
intent.setDataAndType(uri, "*/*");
|
intent.setDataAndType(uri, "*/*");
|
||||||
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
|
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
if (view == confirm) {
|
if (view == confirm) {
|
||||||
|
|
Loading…
Reference in New Issue