- // Set the file name path as the text of the file name edit text.
- fileNameEditText.setText(fileNamePath);
+ // Use the file path from the intent if it exists.
+ if (filePathUri != null) {
+ // Convert the file name URI to a file name path.
+ String fileNamePath = fileNameHelper.convertUriToFileNamePath(filePathUri);
+
+ // Set the file name path as the text of the file name edit text.
+ fileNameEditText.setText(fileNamePath);
+ }