Skip to content

Commit

Permalink
Update FileBrowserActivity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirosakiMio committed Mar 25, 2024
1 parent 5f35774 commit 0e9a2f9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,14 @@ public void onClick(View view) {
}
}
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());
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setDataAndType(uri, "*/*");
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
startActivity(intent);
}
if (view == confirm) {
Expand Down

0 comments on commit 0e9a2f9

Please sign in to comment.