diff --git a/gst-sdk/tutorials/android-tutorial-5/src/com/lamerman/FileDialog.java b/gst-sdk/tutorials/android-tutorial-5/src/com/lamerman/FileDialog.java index 96ff132563..b7e048ceba 100644 --- a/gst-sdk/tutorials/android-tutorial-5/src/com/lamerman/FileDialog.java +++ b/gst-sdk/tutorials/android-tutorial-5/src/com/lamerman/FileDialog.java @@ -285,6 +285,11 @@ public class FileDialog extends ListActivity { }).show(); } } else { + if (selectedFile != null && selectedFile.getPath().equals(file.getPath())) { + getIntent().putExtra(RESULT_PATH, selectedFile.getPath()); + setResult(RESULT_OK, getIntent()); + finish(); + } selectedFile = file; l.setItemChecked(position, true); selectButton.setEnabled(true);